excel4node
excel4node copied to clipboard
Excel files generated by excel4node always showing a warning/error upon opening
@amekkawi Every Excel file that I generate shows a warning/error when opening:
Excel version from Office 2016.
My Excel files do not not have any images, so I'm guessing that the fix proposed in pull request 99 (https://github.com/amekkawi/excel4node/pull/99) won't apply, but I've tried that anyway with no luck.
Any ideas?
Anyone?
So, it appears that this problem will occur if your sheet name is longer than 31 characters.
I had a same problem.
You need to create new Workbook every time when you generate new file:
var wb = new xl.Workbook();
It looks like the 31 character limit is a hard coded limitation into MS Excel. There is nothing that I can find in the XLSX spec about this limitation, however. I'll see about adding some validation and possibly providing a warning/error when attempting to create a worksheet with a name longer than 31 characters.
Sheet Name is less than 31 character, still not opening file in MS Office 2016. And Generating same Error
@HardikGlib, can you provide a gist that demonstrates the issue? That "we found a problem" prompt can occur for many reasons and you may be seeing that for some reason other than the sheet name character length.
I had the same problem. I don't have images and the name of the sheets are less than 31. I thought it could be the file name but it was not.
It did work when I removed special characters ( _ , : é à -) from the sheet name
I hope it can help you
Other things that I've seen cause this are
-
cells with more than 200-ish characters (excel says it can take ~32k characters, so maybe it's a mac thing)
-
malformed links
Might be worth spitting out some warnings when this happens, if specified limits can be trusted.
Also including warnings about (possibly) invalid sheetnames would probably be useful.
So, it appears that this problem will occur if your sheet name is longer than 31 characters.
This one hit us, because it's not on Microsoft's list of Excel limits: https://support.office.com/en-us/article/excel-specifications-and-limits-1672b34d-7043-467e-8e27-269d656771c3
There are many limits that Excel enforces but other readers like LibreOffice, Numbers, GSheets, don't. It might be worthwhile for excel4node to check for at least the easy ones.
The character limits, worksheet name length, etc., can be checked for easily. I imagine the link count limit can also be checked for easily. Simple checks would make the export faster.
Also like others have experienced, Excel will only say "there is a problem". Also since the free readers don't have these limits some developers will find it hard to reproduce bugs.
Hi guys, I'm seeing that the posts are really old... So is this repo still maintained? What about this? I'm having troubles to open generated sheets in MS Excel, but in LibreOffice are opening just fine.