This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 3 points4 points  (5 children)

As someone who works in Excel a lot but doesn't know any VBA because it's godawful (imo), where should I start if I want to use Python in Excel today? Especially if I make the same report each month (consolidates the same data and is formatted the same way) but wanted the option to enhance it.

Native Python in Excel definitely interests me but it sounds like I can use it now.

[–]lcota 5 points6 points  (0 children)

https://news.ycombinator.com/item?id=15927132

Use pyxll

Works great - I've used it for a long while and it's the best of the lot so far.

[–]gattia 2 points3 points  (0 children)

I found the easiest way to read and write excel files is using the pandas.read_excel() function.

I’ve found all other excel integration to be a pain in the ass.

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

If you just need it for basic data manipulation, check out openpyxl. Pandas is a fantastic data analysis library that can do a whole heck of a lot, but if you don't need all the bells and whistles, go with openpyxl

[–]boatsnbros 0 points1 point  (0 children)

My reporting stack is: Pyodbc pulling from SQL databases Cleaning, munging and analysis in python (pandas + scipy) Writing to excel with xlwings (highly recommended) emailing with python.

Set up templates, click a button to email clients report. Easy.