I know similar questions have been popular in the past, but none refers to my problem. I'm looking for a way to read data from Excel file in Python, but I'm strongly against using non-builtin modules.
The reason why is that in my case Python is a component of another software, so incorporating additional module would require from every user knowledge about how to use pip
, which Python installation on your pc should one install module into, etc. The solution must not require any additional actions from user.
I can read CSV files with Python builtin easily, so that could work, but how can I convert Excel to CSV in the first place? Or is there a way to read Excel directly?
Edit: It is Python 2, that is used in this software.
Not really the prettiest solution, but you could download the complete code repository of one of the excel handling packages for python (openpyxl
for example) and put these files in the same directory as the python script that you're going to run. Subsequently you can do an import
of these local package files in your script.
Note: if the excel handling package has dependencies on other packages, then you'll need to download these as well.