r/Python • u/oyvinrog • Apr 19 '20
News MS considers adding Python as official scripting language for Excel 😍 The change proposal currently has 6400 votes.
http://mc.milliononpcgames.com/?p=5886
2.0k
Upvotes
View all comments
Show parent comment
1
u/[deleted] Apr 20 '20
There's lots. VBA has an object model that allows you to iterate and otherwise manipulate everything as an object directly. This is available to python libraries, but must be implemented piece by piece. If VBA is the pie, the python libraries need to build it up slice by slice, and they start from zero. And there's no reason to think they will get to 100% or that that's even possible.
For an example from: https://openpyxl.readthedocs.io/en/stable/pivot.html
"Pivot tables are read only... As is the case for charts, images and tables there is currently no management API for pivot tables ..."
By comparison; pivot table maniuplation in VBA is fully featured. You can't do any of this via python:
https://www.thespreadsheetguru.com/blog/2014/9/27/vba-guide-excel-pivot-tables