K
K
Kai2021-11-09 01:40:16
Python
Kai, 2021-11-09 01:40:16

pandas. How to write data to an excel sheet without changing its formatting?

Hey!
Please tell me how to save data in an excel file without breaking the formatting on the sheet.
The dataframe needs to be inserted onto one existing sheet in the file and overwritten in the future. But keeping the formatting, the size of columns and columns, word wrapping, etc.

df.to_excel() - breaks formatting

Or perhaps after saving by hand, you can somehow specify that you need word wrapping on the entire column, center alignment and column width?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alan Gibizov, 2021-11-09
@phaggi

Search doesn't help? Here is the first link .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question