顾名思义,该项目是Pytho用来处理Excel文档的开发包,无需Widows以及Excel环境的支持。
该项目包含五个子项目:
opepyxl https://pypi.pytho.org/pypi/opepyxlxlsxwriter https://gitee.com/mirrors/XlsxWriterxlrd https://gitee.com/mirrors/xlrdxlwt https://gitee.com/mirrors/xlwtxlutils https://gitee.com/mirrors/xlutils示例代码:
fromopepyxlimportWorkbookwb=Workbook()#grabtheactiveworksheetws=wb.active#Datacabeassigeddirectlytocellsws['A1']=42#Rowscaalsobeappededws.apped([1,2,3])#Pythotypeswillautomaticallybecovertedimportdatetimews['A2']=datetime.datetime.ow()#Savethefilewb.save("sample.xlsx")






评论