首页 > 解决方案 > 我可以使用 python 循环遍历多个 excel 文件并将单个工作表添加到主工作簿吗?

问题描述

长话短说:我正在尝试创建一个程序,该程序循环遍历存储在我计算机上本地的 excel 文件,并将每个 excel 文件中的工作表添加到主工作簿中。

注意:我不想使用 pandas dataframe.append,因为每张纸都有唯一的信息,我想单独保留每张纸。

任何帮助将不胜感激!

标签: pythonexcelpandas

解决方案


I think using openpyxl would be the easiest solution. It'll let you read and write excel sheets, and even gives you the option of creating various sheets. Personally it's my favorite route whenever I'm working with excel.


推荐阅读