Python_ commonly used Excel third-party libraries

1. xlrd (read-only)
xlrd is a library for reading data and formatting information from Excel files. It supports .xls and .xlsx files. http://xlrd.readthedocs.io/en/latest/
xlrd supports reading of .xls, .xlsx files; by setting the on_demand variable, the open_workbook () function loads only those sheets that are needed, thereby saving time and memory (this method The .xlsx file is invalid); the xlrd.Book object has an unload_sheet method, which will unload the worksheet from memory, specified by the worksheet index or worksheet name (this method is not valid for .xlsx files)
2.
xlwt (write only) xlwtxlwt Is a library (such as .xls) for writing data and formatting information to old Excel files https://xlwt.readthedocs.io/en/latest/
xlwt supports writing of .xls files.
xlwt supports writing .xls files.
3. xlutils (only modified)
xlutilsxlutils is a library for processing Excel files, which depends on xlrd and xlwt.
http://xlutils.readthedocs.io/en/latest/
xlutils supports .xls files; supports Excel operations.
4. xlwings (write, read, modify)
xlwingsxlwings is a library that can call Python from Excel or Excel in Python. http://docs.xlwings.org/en/stable/index.html
xlwings supports .xls reading and .xlsx file reading and writing; supports Excel operations; supports VBA; powerful converters can handle most data types, including numpy array and pandas DataFrame in both directions.
5. openpyxl (write, read, modify)
openpyxl is a library for reading and writing Excel 2010 xlsx / xlsm / xltx / xltm files. https://openpyxl.readthedocs.io/en/stable/
openpyxl supports reading and writing of .xlsx files; supports Excel operations; loading large .xlsx files can use read_only mode; writing large .xlsx files can use write_only mode.
6. xlsxwriter (write only)
xlsxwriter is a library for creating Excel .xlsx files.
https://xlsxwriter.readthedocs.io/
xlswriter supports writing of .xlsx files; supports VBA; uses memory optimization mode when writing large .xlsx files.

Published 38 original articles · Like 29 · Visits 10,000+

Guess you like

Origin blog.csdn.net/weixin_45270982/article/details/105547595