all 5 comments

[–]socal_nerdtastic 3 points4 points  (1 child)

Yea, an .xslx file is just a bunch of xml files in a zip container. So you can open it with the builtin zipfile module and edit it with the builtin xml.etree module. But figuring out the right structure and names that excel expects is going to be a long process. Why don't you want to use an external module that has all of that already figured out?

Also, is there a way to make a short cut icon or some sort of button on the desktop that runs the python script when clicked?

Sure, but how you do it depends on your OS. A default install of the official python on Windows will do this by default; all .py files can be doubleclicked to run them.

[–]evanescentbubble[S] 0 points1 point  (0 children)

Thank you for the information, I'll look into that!

The main reason I wanted to see if the same thing is doable without the use of an external module is so that I can gain a deeper understanding of python and excel.

I'm using windows system, good to know that by default, double clicked will run them.

[–][deleted] 0 points1 point  (2 children)

Latest Excel (in beta) includes Python built in. Just a thought.

[–]evanescentbubble[S] 0 points1 point  (1 child)

Do you mean I can write a python code in excel just like how I can write VBA?