I was thinking about how can I use python to obtain the formatting information from one excel file and apply to another one. For example, if I have the "January.xlsx", and I have the data for "February.xlsx" which is the similar structure and information as the January's one, and I want to apply the format of January.xlsx to February's.
Asked
Active
Viewed 61 times
0
-
I haven't read the documentation of the major Python Excel libraries in details, but if I remember correctly copying only the formatting isn't a simple task - it would be on the other hand if you used VBA instead of Python. I love Python and use it for (arguably too) many tasks, but why not use the language most suited to the task in this case? – Grismar Nov 28 '21 at 00:30
-
Checkout this https://stackoverflow.com/questions/36742307/how-to-read-excel-cell-and-retain-or-detect-its-format-in-python. Show how to read formatting info using xlrd. May be you can use xlwt to write the formatting info that was read. – Vivek Nov 28 '21 at 00:40
-
Please provide enough code so others can better understand or reproduce the problem. – Community Dec 02 '21 at 07:54