On 6 Jan 2022, at 9:21, Talha Ağaoğlu wrote:
> Hi,
>
> I am trying to edit a template but as I understand openpyxl sometime
> removes the image. Interestingly some images keep being existing...
Images in worksheets will generally be preserved but not in headers or footers. Support should be possible but would be quite complicated and isn't on my personal agenda.
> Is there a way to add insert to the header and footer? or do you know any
> lib that supports edit xlsx files without breaking the style?
Amongst Python libraries, Openpyxl definitely has the most extensive support for Excel files. If you have Excel on your machine, you could try xlwings which uses Excel to handle files.
Charlie
--
Charlie Clark
Managing Director
Clark Consulting & Research
German Office
Sengelsweg 34
Düsseldorf
D- 40489
Tel:
+49-203-3925-0390
Mobile:
+49-178-782-6226