New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error while using with TypeScript: Error: "Please include the xlsx.js library" #1013
Comments
Does it work if you select into a csv file? "SELECT * INTO CSV"? The solution is to include the xlsx.js library (as stated in the error message) Have a look at https://github.com/SheetJS/js-xlsx |
Any news on this? |
I tried "SELECT * INTO CSV", it doesn't crash but the generated file is not a valid file. I checked the code and saw that the XLSX is taken from
So I imported xlsx library and put the XLSX into window like I also tried to add the xlsx into the HTML with script tag How should I include the xlsx.js library for alasql.js to see it? |
I also tried to see what is in |
It seems like the issue is getXLSX function.
So if the function would be like this it would do the same thing for both conditions. (Since the first condition is empty anyway) and it fixes the TypeScript issue.
Would it be OK to change the function like this? |
Thank you so much for your time to look into this. The |
Awesome. Thanks. |
It was a bit more cryptic than expected. I added a new function: Please try this and let me know if it fixed this.
|
I tried it and I got error while calling Also I have to import the alasql like |
I am working on a project which is created with create-react-app which has TypeScript version. You can see from here: https://github.com/Microsoft/TypeScript-React-Starter
The library is added to package json as:
"alasql": "^0.4.5"
The library is imported like:
import * as alasql from 'alasql';
When it is executed like:
the app crashes and the error message is:
Error: Please include the xlsx.js library
The text was updated successfully, but these errors were encountered: