3 ms·
What about “can programmatically generate word documents and xlsx files in Python”
by suifbwish 5y ago
What about “can programmatically generate word documents and xlsx files in Python”
- Kon-Peki 5y agoIn the context of this article, it is only impressive if you can do it in PowerShell. As an aside, doing it in PowerShell has one advantage - any Windows computer with Office installed can be used without any other dependency. A major disadvantage is that it is slow as molasses if you try to write more than a few hundred rows of data. FYI - we create (and sell) Excel spreadsheets full of data, one of which contains a tab with 90+ million rows, and a Go program will run circles around the equivalent Python program :)
- suifbwish 5y agoIf you use threading, cython to run as c or a cuda gpu library, and of course customize the memory/processor availability of Python, it would be a challenge worth taking. Most people who say Python is slow do not know much about optimizing it.
- Kon-Peki 5y agoYou know, you are right about that in general. We didn’t try your suggestion, but consider that generating an Excel file is probably not very thread-friendly (an Excel file is actually just a zipped directory structure containing a handful of XML files - change the file extension from .xlsx to .zip and have fun exploring!). In this particular use case, the developer effort vs performance ratio is just insanely in favor of Go.