Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the Excel libraries for Python operations

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article is to share with you what Python has to do with the Excel library. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

A brief introduction to common libraries

Environment configuration and realizable operation

1 、 xlrd

Xlrd is a library for reading data and formatting information from Excel files, supporting .xls and .xlsx files.

Http://xlrd.readthedocs.io/en/latest/

1. Xlrd supports reading .xls and .xlsx files.

2. Save time and memory by setting the on_demand variable to make the open_workbook () function load only those needed sheet (this method is not valid for .xlsx files).

3. The xlrd.Book object has a unload_sheet method that unloads the worksheet from memory and is specified by the worksheet index or the worksheet name (this method is not valid for .xlsx files)

2 、 xlwt

Xlwt is a library (such as .xls) that writes data and formatting information to old Excel files.

Https://xlwt.readthedocs.io/en/latest/

1. Xlwt supports .xls file writing.

3 、 xlutils

Xlutils is a library that processes Excel files and relies on xlrd and xlwt.

Http://xlutils.readthedocs.io/en/latest/

1. Xlutils supports .xls files.

2. Support Excel operation.

4 、 xlwings

Xlwings is a library that can call Python from Excel or Excel from python.

Http://docs.xlwings.org/en/stable/index.html

1. Xlwings supports .xls reading and .xlsx file reading and writing.

2. Support Excel operation.

3. Support VBA.

4. Powerful converters can handle most data types, including numpy array and pandas DataFrame in both directions.

5. If you see it all here, why don't you share it in your moments?

5 、 openpyxl

Openpyxl is a library for reading and writing Excel 2010 xlsx/xlsm/xltx/xltm files.

Https://openpyxl.readthedocs.io/en/stable/

1. Openpyxl supports reading and writing .xlsx files.

2. Support Excel operation.

3. Read_only mode can be used to load large .xlsx files.

4. Write_only mode can be used to write large .xlsx files.

6 、 xlsxwriter

Xlsxwriter is a library for creating Excel .xlsx files.

Https://xlsxwriter.readthedocs.io/

1. Xlswriter supports the writing of .xlsx files.

2. Support VBA.

3. Use memory optimization mode when writing large .xlsx files.

7 、 win32com

Win32com inventory is located in pywin32 and is a library for reading, writing and processing Excel files.

Http://pythonexcels.com/python-excel-mini-cookbook/

1. Win32com supports the reading and writing of .xls, .xlsx files and the writing of .xlsx files.

2. Support Excel operation.

8 、 DataNitro

DataNitro is a plug-in embedded in Excel.

Https://datanitro.com/docs/

1. DataNitro supports reading and writing of .xls and .xlsx files.

2. Support Excel operation.

3. Support VBA.

4. Charge. Note: the use of DataNitro as a plug-in depends on the software itself.

9 、 pandas

Pandas realizes data input and output by reading and writing Excel files.

Http://pandas.pydata.org/

1. Pandas supports reading and writing of .xls and .xlsx files.

2. Support loading only a single work page for each table.

Thank you for reading! This is the end of this article on "what is the operation of Python Excel library?". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it out for more people to see!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report