Excel Export error - Excel found unreadable content in File.
Excel Export error - Excel found unreadable content in File.
When I am trying to do Excel Export facing the error "Excel found unreadable content in the file. Dom you want to recover the contents of this workbook? If you trust the source of this workbook, click Yes"> Once I click 'Yes', File tries to open in Protected view but throws an error saying 'Excel completed file level validation and repair. Some parts of this workbook may have been repaired or discarded. Replaced Part: /xl/worksheets/sheet1.xml part with XML error. A qualified name cannot contain multiple colons. Line 1, column 1456.'
But I am able to export the same data into CSV format without any issues. I am using HTML buttons and in IE 11.
Can you please help me out on this issue? I am using below versions for the same.
DataTables 1.5.2
1.
Answers
Unfortunately this is a bug in Buttons 1.5.2 - see this thread for details. I'll be committed a fix soon.
Allan
I am also having this problem. Allen, do you know if this has been resolved? I saw a 1.5.3 version, but it looks like it was for some styling issues and no code was updated.
There have been a lot of threads on issues with IE 11. The fix is in the nightly version. It seems to have resolved the issue for many. AFAIK Buttons 1.5.3 has not been released yet.
Give the nightly version a try and let us know the results.
Kevin
Kevin is spot on as usual. The nightly version fixes it. I'll package up 1.5.3 this week as I really need to get that pushed out - just been working on other things!
Allan
I've also had this issue with my application since upgrading Buttons from 1.5.1 to 1.5.2, and the fixes in the nightly version fixed it almost everywhere. There's still one table where I'm extending the export to add column auto filters to the Excel sheet (as in this forum answer). The error "Non-default namespace declarations must not have an empty URI" is thrown on this line:
Is this a known issue, and does 1.5.3 resolve it?
Its not a known issue. Can you give me an example showing the combination of the auto filters and the nightly version please?
Allan
Here's a rough version of what I'm doing: http://live.datatables.net/yifojova/1/edit
Fixed some errors so it actually runs: http://live.datatables.net/yifojova/2/edit
Note: the issue is specific to IE11.
Thank you - I'll take a look into this before 1.5.3 is tagged.
Allan
Using
XMLSerializer
in IE is fraught with issues. If you have a look at the Buttons code you'll see I have a number of workarounds for it.Instead of using the approach above, I've decided to go ahead and provide the ability to enable this feature in Buttons itself. There is now a
autoFilter
option which can be used to enable the auto filter feature in Excel:Commit
This will be in 1.5.4 or you can grab the latest source from GitHub or the nightly which will be up to date shortly.
Allan
That's great news! Thanks for looking into the issue.
I'm still only seeing Buttons 1.5.2 on Nightly and even older stuff no longer touched on Github. (Not even seeing Buttons) How long before this is in the bundle with everything?
Not long. I've got one for issue I want to fix before issuing the next Buttons update.
Allan
Thanks, looking forward for the update.
Hi,
I'm using Buttons 1.5.4 and found the same issue with below error: (file is attached)
the styles.xml seems be wrong here:
Any help pls...
Hi @chetankjain ,
We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin
Explanation to Mend Excel File Error 'Unable to read file'
I have suggested certain steps to recover excel file ‘unable to read’. You can also try them out for solving your problem regarding excel
Attempt to get opened your '.xls' file by making it 'read-only'. (Follow the technique given below to make text 'Read-Only'):
• Press on the ‘Office button’ and choose ‘save’ for new content or ‘save as’ for formerly saved document.
• Press on the ‘Tools’ and choose ‘General Options’
• Lastly, tick on the ‘read-only’ check-box to make content read-only
• Get a fresh and empty '.xls' file and copy entire thing from the corrupt Excel file to this new file. Save this file and try to open it once more.
• Some times, it is seen that connecting the 'Visual Basic' component of MS Office 2010 decides the error message. Follow the below mentioned steps to do the same:
• 'Navigate to 'Control Panel >> Programs' -> select Microsoft Office 2010, and then click 'Change >> Add or Remove Programs' -> at the bottom of this list, click the 'plus' sign provided next to Office Shared Features -> click Visual Basic for Applications -> After that, right-click and choose Run from My Computer -> click Continue'.
• Restart your system when this procedure ends