擅长:python、mysql、java
<p>您可以将<a href="http://pandas.pydata.org/" rel="nofollow noreferrer">pandas</a>(python数据分析库)用于此任务。在</p>
<p>通过<code>pip install pandas</code>安装它。在</p>
<pre><code>import pandas as pd
datasets = [dataset, column_sum, row_sum]
sheet_names = ['img_reshape', 'column_sum', 'row_sum']
excel_filename = 'abcd.xlsx'
with pd.ExcelWriter(excel_filename) as writer:
for data, sheet in zip(datasets, sheet_names):
df = pd.DataFrame(data)
df.to_excel(writer, sheet_name=sheet, header=None)
</code></pre>