xlwings还可以和matplotlib、numpy以及pandas无缝连接,支持读写numpy、pandas的数据类型,将matplotlib可视化图表导入到excel中。...,只需要指定其实单元格位置即可
sht.range('A2').value = [['Foo 1', 'Foo 2', 'Foo 3'], [10.0, 20.0, 30.0]]
读取表中批量数据,使用...as np
np_data = np.array((1,2,3))
sht.range('F1').value = np_data
支持将pandas DataFrame数据类型写入excel
import...pandas as pd
df = pd.DataFrame([[1,2], [3,4]], columns=['a', 'b'])
sht.range('A5').value = df
将数据读取,...中调用VBA,也可以在VBA中使用python编程,这些通过xlwings都可以巧妙实现。