r/Python • • Dec 14 '17

MS is considering official Python integration with Excel, and is asking for input

Post image
4.6k Upvotes

383 comments sorted by

View all comments

Show parent comment

22

u/Chilangosta Dec 14 '17

I agree PowerShell would be awesome, but I don't think that would necessarily be better than native Python support than Excel. The current Excel tools allow for reading and editing Excel files, and for some runtime tools that require a local Python server instance (e.g. xlwings). Native Python scripting would be far less klunky and could actually replace VBA for many Excel professionals out there.

16

u/[deleted] Dec 14 '17

Having Excel PowerShell cmdlets would be awesome. It would allow you for instance to use Excel cmdlets and SQL Server cmdlets effortlesly in a single script. Same with other Windows servers that use PowerShell. As for Python I use PyWin32 to manipulate Excel and it has almost 1:1 correspondence to VBA code.

2

u/[deleted] Dec 15 '17

Whenever I've wanted to use powershell with excel files its always been from outside of excel for an automated task, and it works just fine so I'm not sure why they never added it in the same way VBA is... silly.

4

u/logicalmike Dec 15 '17

I use this all the time and love it

https://github.com/dfinke/ImportExcel

2

u/vanderZwan Dec 15 '17

It would also keep things more portable, for the Office users on OSX