Re:Call Python functions from VBA in all Microsoft Office apps
by montenegrohugo on Monday October 08, 2018 @10:20AM
(#18167660)
Why not just use Pandas? Whenever I want to do any slightly complex modification to an excel table I just load it into Pandas instead. It's a complete breeze and very fast.
Re:Call Python functions from VBA in all Microsoft Office apps
by pletnes on Monday October 08, 2018 @11:43AM
(#18168450)
Pandas uses the openpyxl module, which can both read and write. Itβs quite nice and pure python, too. Pandas is more high level and gives less control but also less code.
I wound up reading/writing our spreadsheets in pure Python -- we used xlwt which doesn't support xlsx, so I'd probably consider using openpyxl these days.
(Specifically we were selecting parts of spreadsheets based on row/column headers inside the spreadsheet even if they weren't in the first row/column or there were multiple tables per tab; if this sounds useful to you check out https://github.com/sensiblecodeio/xypath )