Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

315
Vistas
import excel file and read it using ionic

i want to upload a excel file and read it using ionic-angular , i try with this code but it doesn't work for ionic app its just work for browser i dont know why ?

i want to read it and get a value from it and it doesn't work in ionic app (android )
if there is any plugin for excel file help me

this is my code

<ion-input #inputFile id="input-file" type="file" (change)="excelRead($event)" multiple></ion-input>



 public excelRead(e :any  ){
    let fileReaded :any ;
    fileReaded = e.target.files[0];
    let type = e.target.files[0].name.split('.').pop();
   console.log(fileReaded.name)
    const schema = {
      'Material' :{
        prop : 'material',
        type : String ,
        required : false 

      } ,
      'Description' :{
        prop : 'description',
        type : String ,
        required : false 

      } ,
      'Emplacement' :{
        prop : 'emplacement',
        type : String ,
        required : false 

      } ,
      'Physique' :{
        prop : 'physique',
        type : Number ,
        required : false 

      } ,
      'Sap' :{
        prop : 'sap',
        type : Number ,
        required : false 

      } ,
      'Ecart' :{
        prop : 'ecart',
        type : Number ,
        required : false 

      } ,
      'Cagette' :{
        prop : 'cagette',
        type : String ,
        required : false 

      } ,

    };

  
    readXlsxFile(fileReaded, {schema}).then((data) =>{

      console.log("message1")
        if( data.rows){

          for (let i of data.rows){
            console.log("message2")
            this.inventaireTab.push(i);

          }                
        }
        console.log("message3")
        console.log(this.inventaireTab)

      for (let i = 0; i < this.inventaireTab.length; i++) {
      
   
      this.quantite.push(this.inventaireTab[i].physique) 
       
        
      }
      console.log(this.quantite)

    }
    
    
    
    )

  }

if you have any suggestion help me

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You have to use Ionic File Opener Plugin: https://ionicframework.com/docs/native/file-opener

Use this link for reference as in Plugin Documentation usage you'll find only for PDF: how to open (doc, ppt, xlsx, pdf, jpg ,png) file using ionic native file opener

By this you can open different file formats.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda