-
-
Notifications
You must be signed in to change notification settings - Fork 240
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
Complex Excel Structure -> Cells location jumbled upon saving #259
Comments
what software created the original file? |
The file was created with Windows version of Microsoft Excel, it's a .xls file too. I think it might have to do with the fact that the file has many use of merged cells. I tried two simple tests to create an easy replication:
Would I be able to privately send the XLS file so you can confirm the issue? |
Please try to open and save the file with LibreOffice and then try to edit it again using spreadsheet. Does that work? |
After saving w/ LibreOffice, now spreadsheet gem cannot read the excel.
|
Did you save the file as UTF-8? Which version of LibreOffice and which OS are you using? |
LibreOffice 7.1.0.3, Mac OSX. There is no option to choose UTF-8 when saving as xls. The resulting file can be opened in LibreOffice, but is not readable by spreadsheet gem. Can I email you the original file and you try to open/save with your libre office version, then read it in spreadsheet gem? This way we can eliminate the possibility of environmental factors? |
Please share the Ruby script with which you want to open the file. Also look at this commit here: https://github.com/zdavatz/spreadsheet/blob/master/History.md#111--03012016 where we had a similar error. Maybe you can send a Pull Request. This is the commit: e59b337 |
I tried digging into the code myself, but was unable to get anywhere. Is there a way to know exactly what encoding LibreOffice is using when saving? I tried setting the unknown codepage to MACROMAN, but would get invalid byte sequence errors, I tried UTF-8, and didn't get invalid byte sequence errors, but in BIFF8, it kept encountering a lot of errors due to nil values here and there. |
For me the question is which language/character uses that "strange" characterset in your XLS? |
It's all alphanumeric characters. Language is set to English (US), I changed all items to font "Times New Roman" I even tried running a macros to enforce all alphanumeric characters only.
|
Which Windows Version and which MS Excel Version created the orginial file? Can these people try to create the same file using LibreOffice on Windows? |
Ok, good to know, thank you for reporting! |
When parsing a complex structure excel file (i.e. lots of merges, etc), then modifying a few specific cells, the output file changes the cell locations of many unrelated cells around the sheet (both row/column position are being shifted for other cells).
Is there anything I should provide to help you be able to replicate the issue?
The text was updated successfully, but these errors were encountered: