Python Forum
Excel: Apply formating of a sheet(file1) to another sheet(file2) - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Excel: Apply formating of a sheet(file1) to another sheet(file2) (/thread-27101.html)



Excel: Apply formating of a sheet(file1) to another sheet(file2) - lowermoon - May-26-2020

Hello!

Does python offers the possibility of applying the formatting style from a sheet (from file1) to another sheet(from file2). I would like to this without opening the file and just apply the "format painter" or without trying using macros or VBA s.

This can be done by python or do I need to install additional plugins/add-ons?


RE: Excel: Apply formating of a sheet(file1) to another sheet(file2) - buran - May-26-2020

(May-26-2020, 07:00 AM)lowermoon Wrote: I would like to this without opening the file
How do you expect to read from and write to a file without opening the source and target files? By opening I don't mean starting excel application...
There are plenty of packages to work with excel files. It may depend on file format - xls or xlsx.
For example - relevant section in openpyxl documentation - Working with styles