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

389
Views
how to get the date format of a cell when I parse excel file (XLSX)

I'm trying to parse an excel document with XLSX(vuejs).

I have two columns with dateFormat(dd/mm/yy) in my excel document, I want to prevent problems and know when the dateFormat of a parsed cell is different from the setup. If someone changed manually the dateFormat of a cell in the excel file I want to know it when parsing it with my function and reformat. At the end, I want all my dates to be dd/mm/yy.

I don't know where to go from my function.

Here is my function:

handleFilesUpload (fileList) {
        const uploadedFiles = this.files;
        if (uploadedFiles) {
            const f = uploadedFiles;
            const reader = new FileReader();

            reader.onload = (e) => {
                const data = new Uint8Array(e.target.result);
                const workbook = read(data, {
                    type: "array"
                });
                const worksheet = workbook.Sheets[workbook.SheetNames[0]];
                const json = utils.sheet_to_json(worksheet, {
                    header: 1,
                    raw: false,
                });
                
                const filteredJson = json.filter((array) => array.length > 0).splice(4, 50); // to limit the table parsed
                const newJson = filteredJson.map((array) => {
                    // here I parse and manipulate data from arrays to return a new object
                }).filter(array => !array.title.includes("undefined"));
                this.excelDatas = newJson;
            };
            reader.readAsArrayBuffer(f);
        } else {
            this.excelDatas = [];
        }
    },
about 4 years ago · Juan Pablo Isaza
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!