When I open the exported xls file in Microsoft Excel it shows this warning "Excel found unreadable content in *.xls. Do you want to recover the contents of this workbook? If you trust the source of this workbook, click yes" . If I click yes , it shows the content correctly. But the warning is really annoying for users. Please resolve.
Interesting.
Would it be possible for you to provide an example generateing a file that gives this alert?
Yes. I can. Please hold on.
I have emailed you the document. I'm getting this error "Attaching documents requires write permission to this repository" when I tried to attach.
Its best if you put put the code to generate the problem file here on github.
@harikrishnanp
Hvae you had time to look at what code generates the problem files?
Please find the sample code that will generate the above error.
var data = [{city:"Minsk",population:100000}, {city:"Riga",population:200000}];
window.exportData = function () {
alasql("SELECT * INTO XLSX('cities.xlsx',{headers:true}) FROM ? ",[data]);
}
Great thanks !
Update: Even a JSFIDDLE - perfect - thanks...
You are just using an old version of AlaSQL
Please use http://cdn.jsdelivr.net/alasql/0.2/alasql.min.js as in this jsfiddle: http://jsfiddle.net/0xgfjcre/51/
Sorry for that - I posted wrongly first - hoped I had time to correct it before you saw it :)
Did it solved the issue? I am using the suggested version but still getting the same warning message while trying to open the exported excel?
We have not found a solution yet.
@mathiasrw your last fiddle worked fine for me in Chrome, no alert generated in Excel 2010.
Oh... thanks @kingsbury - I might got confused about the issues
@rupendra-sharma07 could you try http://jsfiddle.net/0xgfjcre/51/ and see if you get an error in excel? It should work...
My issue was fixed by updating AlaSQL.
Hello every body,
I have the same problem when i try to open the export ==>
alasql( 'SELECT * INTO XLS("' + exportFileName + '.xls",?) FROM ?',[ opts, data] );
and when I use this second request alasql( 'SELECT * INTO XLSX("' + exportFileName + '.xlsx",?) FROM ?',[ opts, data] ); I don't have the warning but i can't include styles inside xlsx file, I think it's normal because in the alasql's documentation they use the request without any "opts" just like this (alasql( 'SELECT * INTO XLSX("' + exportFileName + '.xlsx",?) FROM ?',[data] );),
My question is : how can I export excel file from json with ALASQL without the warning message when I try to open it and, I mustto include some styles inside the file ?
thx in advance for your responses
@RAFBOUK Please open 2 new issues with one question in each
I have the same issue as @RAFBOUK . did anyone found solution?
@juni103 Please open a new issue on this.
For future readers,
I also met this issue. But the problem was my null value which would be cell value.
For example,
const data = [{city:"Minsk",population:100000}, {city:"Riga",population:200000}]; will be fine.
However,
const data = [{city:"Minsk",population:100000}, {city:"Riga",population: null}]; will cause this problem again.
Additionally, undefined is ok.
Hello @mathiasrw. I have to upgrade the alasql/xlsx versions. I am now on the latest version of alasql (0.4.11) and xlxs (0.7.12). When I download and open the excel file I get the error:
We found a problem with some content in 'test_data.xlsx'. Do you want us to try to recover as much as we can? If you trust the source of this workbook, click Yes.
I do have some rows of data with "null". This wasn't an issue in my previous alasql version 0.4.0. Is there a solution for this?
We have not found a way to solve this. Its because we are not Microsoft and its warning that some other party (you) made the file.
If you just click "yes" its all gonna work.
Hi @mathiasrw. Is there any news about this problem?
Nope.