I have an "Excel template" that:
- Opens existing file
- Edits cell values without modifying the styles (font, cell width and height, cell merge, etc.)
- Adds or inserts an image (jpg or png) to save it in a new file.
I have tried 4 options at the moment.
- XLWT/XLRD - This baby does what it seems to be the most efficient work, it opens the xlsx pretty well keeping all styles, it is very easy to edit cells (with some tricks to keep the style) BUT it only inserts Bitmap (bmp) images, and when it inserts the image, it becomes stretched, not keeping aspect radio nor size, I would like to know if it has solution.
- XLSXWritter - It is very functional and easy to use to CREATE NEW FILES. It can't open existing ones. This is not an option. :(
- openpyxl - It appears to insert images with PIL (jpg, png, gif, etc.), but when I open the existing "template" all the styles are gone, everything!! so it is not an option.
- pythonexcels - It seems to work with Microsoft Office Excel and win32com so maybe it is not a crossed platform option, and I can't find a way to insert images with this.
I think I could use some PDF creator as well but I need to keep the page size because I need to send the created file to a printer, but not with a letter or A4 size, I need to print in adhesive labels of different sizes.
Question: Is there any other solution to xlwt?