mgcrea/node-xlsx

TypeError: input.replace is not a function

colo13verdadeo opened this issue · 5 comments

               input = input.replace(/[^\w\+\/\=]/g, "");
                                  ^

TypeError: input.replace is not a function

Code:

const fs = require('fs')

//Cierra dependencias


function importar(ruta){
    archivo = XLSX.readFile(ruta) 
    hojas = archivo.SheetNames;
    console.log(hojas)
    datos = XLSX.utils.sheet_to_json(archivo.Sheets[hojas[0]])
    console.log(datos)
    console.log()
    for(itemfila of datos){
    console.log(datos['Usuarios'])}
}


console.log(xlsx.parse(`./importarexcel.xlsx`))```
stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Hello @colo13verdadeo, I have the same issue (#182). Did you find a solution?

@mgcrea Any idea? Your library worked very well in a local node, but doesn't seem to like being migrated in a Remix (https://remix.run) project :S

stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

I'm still getting this error, any solution?
My app crashed in this line.
XLSX.read(file);