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

391
Vistas
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
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