xlwings - 让Excel跑得飞快!

xlwings (Open Source) is a BSD-licensed Python library that makes it easy to call Python from Excel and vice versa:

  • Scripting(脚本): 使用类似VBA的语法,在Python中自动处理Excel数据或者与Excel交互。

  • Macros(宏): 用强大而干净的Python代码替代VBA宏。

  • UDFs(用户定义函数): 用Python编写用户定义函数(UDFs),仅适用于windows系统。

完全支持 Numpy arrays(数组)Pandas Series(序列)/DataFrames 。 带有xlwings支持的工作簿可以在 WindowsMac 系统中很容易地分发和使用。

Getting Started

Start here if you are new to xlwings. Learn about the syntax, the RunPython call, the add-in and UDFs.

快速入门
Advanced Features

More in-depths explanations about converters, debugging or how to write your own add-in.

转换器及选项
xlwings Lite & xlwings Server

To run xlwings without having to install Python, you have two options:

  • xlwings Lite: Install the free add-in from Excel's add-in store and you're done. It comes with a VS Code-like editor and Wingman, a powerful AI assistant.

  • xlwings Server: Create your own modern Excel add-in with Python instead of JavaScript. Python runs on your own server and comes with enterprise features such as SSO and RBAC.

API Reference

This is a description of all the classes, methods, properties and functions that xlwings offers to work with the Excel object model.

API Reference