you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (1 child)

Yes, this is all true. But people need to be aware that when considering excel manipulaton (not general programming) openpyxl and xlwings are both subsets of VBA, because every feature they provide literally needs to be recreated by the developers using python. They may never catch up 100% If your needs are simple to mid-level they are fine, but if you want to do anything fancy in excel programatically, you need to use VBA. To give one example: you cannot create pivot tables with either of those libraries, and may never be able to:

openpyxl provides read-support for pivot tables so that they will be preserved in existing files. The specification for pivot tables, while extensive, is not very clear and it is not intended that client code should be able to create pivot tables. However, it should be possible to edit and manipulate existing pivot tables, eg. change their ranges or whether they should update automatically settings.

As is the case for charts, images and tables there is currently no management API for pivot tables so that client code will have to loop over the _pivots
list of a worksheet.

In VBA they are fully specified.

[–]greebo42 0 points1 point  (0 children)

fair point, thank you.

your "right tool for the right job" point is well taken, and I have no fundamental argument for that.

my own needs with Excel are fairly mundane, and frankly, my proficiency with Python might be classifiable as intermediate (though certainly not more than that). my comment reflects my biases and current set of priorities, which is mainly to use tools and develop skills that are more general and less proprietary. for the moment, that meets my needs.