Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

314
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!