[Tutor] Recommendation to supersede openpyxl

Jim Byrnes jf_byrnes at comcast.net
Mon Nov 30 15:45:02 EST 2020


On 11/30/20 1:00 PM, Dennis Lee Bieber wrote:
> On Mon, 30 Nov 2020 12:44:04 +0000, Alan Gauld via Tutor <tutor at python.org>
> declaimed the following:
> 
>> On 29/11/2020 04:53, Sailormoon wrote:
>>> Dear  sir :
>>> Recently I used The openpyxl library to modify some excel documents
>>> and save that ,I found all The inserted picture omission
>>
> 	<SNIP>
>>
>> Personally I've only ever used the csv module to create
>> excel readable csv files, but it sounds like you need
>> more than that would provide.
> 
> 	I'd have to concur. Most of the Excel interface packages appear to
> focus on just the numeric data contents, and /maybe/ formulas. Not on
> things that are Excel GUI oriented (forms, embedded images, macros, and VBA
> scripts).
> 
> 	For that level of manipulation, I suspect one will need to script Excel
> itself -- not using libraries that just read/write plain Excel files. From
> Python that means pywin32 COM control, OR MAYBE using ctypes instead, to
> invoke the Excel engine (.DLLs) directly (IOWs, running Excel in the
> background and asking /it/ to make the changes to the document)..
> 
> 

I don't use windows so I have never used Excel so maybe I am way off 
base here. I have used a combination of pyautogui, oosheet and even 
openypxl to modify Libreoffice calc sheets. Using pyautogui's ability to 
send keystrokes I can manipulate calc's menu system and take advantage 
of what it offers. Maybe you can do the same with Excel.

Regards,  Jim



More information about the Tutor mailing list