equal-access icon indicating copy to clipboard operation
equal-access copied to clipboard

npm- Unable to Generate xlsx file (and csv). Able to generate html, json

Open Adr0it opened this issue 1 year ago • 2 comments

Discussed in https://github.com/IBMa/equal-access/discussions/1836

Originally posted by Adr0it February 10, 2024 Hello, I'm not the best programmer, so I may be making obvious mistake somewhere, but I'm trying to generate an excel report with your npm package. Unfortunately, no xlsx is being generated. The same goes for csv. The only thing that generates is the corresponding html and json. Here are pictures. image image image image

I'm trying to generate the Excel file that is generated by the Chrome extension, except programmatically.

Adr0it avatar Feb 11 '24 19:02 Adr0it

@Adr0it Just for clarity, you're running in plain Node and not within a test framework like jest, mocha, cucumber, ....?

tombrunet avatar Feb 12 '24 20:02 tombrunet

@Adr0it Just for clarity, you're running in plain Node and not within a test framework like jest, mocha, cucumber, ....?

Yes, regular NodeJS in VS Code.

Adr0it avatar Feb 12 '24 21:02 Adr0it

Ok, I see the issue. When I passed a "Page" object into the method using Puppeteer, it did generate an Excel file. However, I was using axios package to just get html content as a string or something, and it wasn't working, and I didn't know why.

Adr0it avatar Mar 28 '24 21:03 Adr0it

requested @tombrunet for review.

shunguoy avatar Apr 11 '24 19:04 shunguoy