How can I write an excel file(xls/xlsx) using xlrd
module alone?
I tried from xlrd import xlsx
, but couldn't find anything that will really help me.
Asked
Active
Viewed 5,334 times
1

Bellerofont
- 1,081
- 18
- 17
- 16

Sohn
- 166
- 3
- 13
1 Answers
3
xlrd only reads excel files. To write them, look up xlwt, xlutils, xlsxwriter, or openpyxl - all of these packages can write binary files excel can read. Excel can also read csv files, which the csv
package (included with Python) can write (and read).

cco
- 5,873
- 1
- 16
- 21
-
The Xlrd and XlsxWriter formats are different object types and are not interchangeable, see https://stackoverflow.com/a/38950636/1059398 – virtualxtc Jun 18 '18 at 07:54
-
Also, xlutils uses xlrd and xlwt, so it's not really a separate option. – virtualxtc Jun 18 '18 at 08:08