How can I convert a XLSB file to csv using python?
Question: I have been provided with a xlsb file full of data. I want to process the data
using python. I can convert it to csv using excel or open office, but I would
like the whole process to be more automated. Any ideas?

**Update:** I took a look at this
[question](https://stackoverflow.com/questions/1858195/convert-xls-to-csv-on-
command-line "question") and used the first answer:

    
    
    import subprocess
    subprocess.call("cscript XlsToCsv.vbs data.xlsb data.csv", shell=False)
    

The issue is the file contains greek letters so the encoding is not preserved.
Opening the csv with Notepad++ it looks as it should, but when I try to insert
into a database comes like this ���. Opening the file as csv, just to read
text is displayed like this: \xc2\xc5\xcb instead of ΒΕΛ.

I realize it's an issue in encoding, but it's possible to retain the original
encoding converting the xlsb file to csv ?


Answer: Most popular Excel python packages
[openpyxl](https://bitbucket.org/ericgazoni/openpyxl) and
[xlrd](https://github.com/python-excel/xlrd/) have no support for `xlsb`
format (bug tracker entries: [openpyxl](https://github.com/python-
excel/xlrd/issues/83), [xlrd](https://github.com/python-
excel/xlrd/issues/83)).

So I'm afraid there is no native python way =/. However, since you are using
windows, it should be easy to script the task with external tools.

I would suggest taking look at [Convert XLS to XLSB
Programatically?](http://stackoverflow.com/questions/6442698/convert-xls-to-
xlsb-programatically). You mention python in title but the matter of the
question does not imply you are strongly coupled to it, so you could go pure
c# way.

If you feel really comfortable only with python one of the answers there
suggests a command line tool under a fancy name of [Convert-
XLSB](http://www.softinterface.com/Convert-XLS/Features/Convert-XLSB.htm). You
could script it as an external tool from python with
[`subprocess`](https://docs.python.org/2/library/subprocess.html).

I know this is not a good answer, but I don't think there is better/easier way
as of now.

