Excel - some tables - Excel found unreadable data
Excel - some tables - Excel found unreadable data
Hi Allan,
Buttons is great - thanks.
I have an issue with only some excel tables - when you try to open them I get
"Excel found unreadable content in 'XXXX.xlsx'. Do you want to recover."etc
When you click to open anyway you get the message ' Excel was unable to open the flle by repairing or removing the unreadable content'
It say illegal character at column 16193
I unzipped the xlsx and proceeded to the said column in the workbook. In two seperate - misbehaving tables the erroneous data was the same
It pointed to the n in 'Fitness & ' ?
Thanks for the great work
Replies
An Update on this one. On another table the error points to the a in 'Health &'
Think it might be something to do with the ampersand & ?
If anybody else has this issue, I got around it by doing this.
Replace line 511 in buttons.html5.js
with this
Note the second & in the replace above should be ' ampersand hash zero three eight colon' it gets converted to an ampersand automatically here.
Working great.
Hi,
Thanks for your posts on this. I've just been experimenting with ampersands in the file, and making the change you suggest appears to cause some issues - specifically of it have
& amp;
(without the space, which is so the forum doesn't render it) then it would become& #038;amp;
which Excel then renders as& amp;
(again without the space).Without the change, then Excel renders
& amp;
just like a browser would.Could you link to your page so I can take a look and try to correct this please? I'm hoping to get Buttons 1.0.1 out today, and would like to get this fix in if possible, but I've not been able to recreate the issue yet.
Thanks,
Allan
Hi Allan,
I'm also getting the Excel message.
http://gis.garfield-county.com/dev/Excel/testmap.html?parcelid=218509100018
Excellent - thanks you for the link! I will take a look into this shortly (doing my morning support rounds first :-) ).
Allan
Hello Allan,
I found an additional problem related to this.
Excel gives me the same error if a cell has a content like this '6150E-6503'. I think it is confusing it with a number and trying to do something with it.
I am also experiencing the problem if a cell has a '&' in its content.
Thanks, Jorge
Thanks for the test case about the ampersand. I've committed a fix and Buttons 1.0.3 will contain the fix.
I've still to look into the
6150E-6503
error (the fix for which won't be in 1.0.3 I'm afraid).Allan
Allan,
I was able to fix my problem (a cell containing something like:
6150E-6503
) by checking ife-
is part of a number and not passing it as a number to excel.I changed the following line in my copy of the buttons code:
js
b.push(g.isNumeric(a[c]) && (a[c] + '').toLowerCase().indexOf("e-") === -1?'<c t="n"><v>'+a[c]+"</v></c>":'<c t="inlineStr"><is><t>'+a[c].replace(/&(?!amp;)/g,"&")+"</t></is></c>");
Thanks for posting back! I'll get this integrated for the next release.
Allan
I've just committed the change. It is in the nightly version now and will be in the next release.
Allan
Thank you!