Parsing Excel files with Python 3.x - excel

I have found very few libraries in Python able to parse excel files, and none of them were in Python 3.x nor passed with success the 2to3 step.
What would be your suggestions ?

Have a look at Python Package Index (Pypi), section Python 3 .
xlrd3 is a port of xlrd, a python 2.x lib to parse Excel files.

My suggestion would be to contact the authors of the libraries and help port them. It's not horribly hard and quite fun! Your only other option is to use Python 2, and that is obviously not as fun. :)
Possibly you could export to CSV as well, but I guess you would have if that was an option.

xlsxwriter is a good tool I've found, and practically the only one for Python 3 that hasn't been discontinued.
I know it works well with both Linux and Windows--LibreOffice in both Linux and Windows, and Excel in Windows.

Related

I have tried many methods and I couldn't find solution. So how to convert Python file to executables?

Python : 3.5
PYinstaller : 3.5
Win64
cx_Freeze : 6.0
According to the above information, I have tried to convert Python project to exe but it does not work.
First I have tried pyinstaller but the process throw some error:
After that, I have tried cx_Freeze and it works, but the exe are working on some computer but not on every computer that have same platform.
I don't know what I can do. I looked for google and stackoverflow but there are unsolved problems or I couldn't see the solution.
Later I have tried to change python version but doesn't work again. Computers that have tried to running the exe, have same OS platform, I'm sure.
By the way, if you receive the following cx_Freeze error, resolving like this:
Build\exe.win-amd64-3.7\lib\scipy\spatial\cKDTree.cp37-win_amd64
change to
Build\exe.win-amd64-3.7\lib\scipy\spatial\ckdtree.cp37-win_amd64
Program uses the following modules : tkinter, pydicom, skimage, PIL, cv2, etc.
Primarily Program has 2 page that content code but I made single file for I came across this sentence "It's worth noting that pyinstaller can compile to a single .exe file"
What do you suggest I do? Thanks for your help.
Edit: I have been tried "Auto-py-to-exe" but I got an error (Fatal Error : Failed to execute script")
Edit2: I tried to run outside the anaconda. I think its work. But I'm still testing.
Edit3: I have tried to change python version, GUI was opened another computer but the program is not work properly. the program works on my computer but not on another computers
If you are not able to convert python file to executable format, you can try using auto py-to-exe library.
This library contains a GUI format to convert .py files to .exe
Here you can find auto py-to-exe with usage instructions,
https://pypi.org/project/auto-py-to-exe/

How to syntax check Python?

I'm writing just a simple Python 3 program (beginner here) and I want to syntax check the code rather than just run it and see errors. How can I do this?
I've done python3 -m py_compile sender.py but nothing changes or is displayed. I'm using version 3.5.2 in Ubuntu, and sender.py is in the directory that I'm currently in.
There are some Python editors than can do this.
For example, Spyder and PyCharm.
They highlight the code segments that have problems.
If you are looking for tools similar to regular compilers, then you can have a look at this stackoverflow question and this with good answers.

Getting python to type

How would I get python to type for me. The only thing I've found was on SendKeys but I can't find the version for python 3.5. Is there any built in module I can use to get python to type for me?
The win32api, assuming windows, has what you need in the keybd_event() function. Documentation here. As for built-ins, not aware of anything like that. Also, see this page.

CSV to XLS linux script

I need a script to convert a comma seperated csv file to an excel xls file. I tried a python script online but i couldn't install the correct version of python to install a mod/dependency the script required. What is the best solution?
cheat: rename data.csv to data.xls. excel opens it and you never notice the difference
Look for the examples/csv2xls here: http://search.cpan.org/~hmbrand/Text-CSV_XS/MANIFEST
(I don't link directly to the script itself because this should always lead you to the latest version.)
The Perl ExcelWriter module will allow you to create Excel spreadsheets.

xls to text converter

Anyone know of a free xls to text converter that can be run from the unix command line?
There is also the package catdoc (Ubuntu link) that includes a xls2csv utility.
A quick search of apt-cache turned up the Ubuntu package python-excelerator for excelerator, which includes py_xls2html, py_xls2csv and py_xls2txt utlities. Will this work for you?
Your question reminded me of anti-word. I looked up and found anti-excel. I have never used it, so I can't vouch for how well it work or whether it makes achievable the task you have at hand. Also, I remember using a utility called 'sc' on linux to created spreadsheets on the console---though, I do not know whether it is capable of interpreting XLS files.
I think gnumeric is better to convert document to csv http://xmodulo.com/2012/06/how-to-convert-xlsx-files-to-xls-or-csv.html

Resources