问题
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.
回答1:
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).
来源:https://stackoverflow.com/questions/41886791/how-to-use-xlrd-for-writing-an-excel-file