-
-
Notifications
You must be signed in to change notification settings - Fork 166
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
Formatting loss after save_as in xlsx, xls, ods #248
Comments
Thanks for using pyexcel. I am afraid that so far formatting is one of the pyexcel disabilities and I am not sure if we will ever fullfil your request. But if it is only date format, we can assign it to individual plugins to sort them out one by one. |
Hi chfw, thanks for your prompt reply.
You know how much time it needs to format any single property of many columns on dozen of sheets.... Do not misunderstand me: Pyexcel is a great package to access data on Excel files, just in READ-ONLY, to migrate to SQL or elaborate and present them in some other ways. What I really cannot understand is where the loss happens. Could you estimate how much time (man hours) would it take to upgrade the packages to resolve the "saving" issue? LibreOffice has the worse documentation about the "BASIC" programming I have ever seen and it is not fully compatible with VBA. It's a hell. Looking at other alternatives, if found the openpyxl python package. It looks keeping any cell formatting, at least what is present inside the test sheet. Anyway, I hope you will improve your library, because i like the modular approach it has. Thanks for your time. |
@chfw Is that to say that losing all formatting is an expected outcome -- that pyexcel simply doesn't currently support preserving the formatting? Just want to clarify this situation as opposed to this being a bug. |
Hi,
I wrote a script to do some elaboration of a ods file and i noticed it looses the cells formatting.
So i tried with xlsx and xls and it seems the issue is present there as well, with a little difference in xls (that keeps the date format).
The versions of the packages are the following:
I wrote this python code to test the issue:
ODS before saving:
ODS after saving:
XLSX before saving:
XLSX after saving:
XLS before saving:
XLS after saving:
What i noticed more is that BEFORE installing the XLS package, the XLSX package was adding the time 00:00:00 to the date too.
After having installed the XLS package, the XLSX changed his behavior, stopping to add the time to the date (as you can see in the picture).
Maybe the XLS package has the priority over the XLSX and it has fixed the date format issue.
I have also extracted the folders from the good original ODS file and the (bad) saved one.
They differ a lot, in terms of number of files and contents.
ODS Original
ODS Saved
Why those plugins heavily modify the files just for loading and saving, without even touching a cell?
I have some Excel files containing tons of data, formatting/conditional formatting, graphs and so on, then I'm not able to use pyexcel at the moment because obviously i have no time to re-format everything manually over 20 sheets, every time i simply run a python script against the file.
I was so much happy to get rid of VBA but I think I was wrong...
Thanks for your kind attention and time.
I hope you can fix those issues.
Daniele
The text was updated successfully, but these errors were encountered: