catamphetamine / read-excel-file

Read *.xlsx files in a browser or Node.js. Parse to JSON with a strict schema.

Home Page:https://catamphetamine.gitlab.io/read-excel-file/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error: "styles.xml" file not found in the *.xlsx file

goranapivis opened this issue · comments

I have no idea why I got this error. I just trying to import an xlsx file that I have dl from my CRM.

node index.js
(node:47359) UnhandledPromiseRejectionWarning: Error: "styles.xml" file not found in the *.xlsx file

My simple code:

const xlsxFile = require('read-excel-file/node');
 
xlsxFile('./Lagerstatus.xlsx').then((rows) => {
    console.log(rows);
    console.table(rows);
   })

Where did you get the file from?

From a Swedish CRM called Hyrma.

Looks like it doesn't have styles.xml inside (it's a zip archive).

Yes that it's what the error message says. But I don't normally touch Microsoft stuff, so I do not know why it's missing or why it should have an styles.xml.

Can I just add a fake style file somewhere?

There is a lot of xml files inside such as [Content_Types].xml and workbook.xml but no styles.xml

Ok, switching to csv parser instead, so I don't have to depend on Bill! :-)