使用python将Excel工作簿表合并为一个 [英] Combining excel workbook sheet into one using python
问题描述
我大约需要合并30份excel工作簿.每个工作簿都有可变数量的工作表,但是我需要从每个工作簿中合并的工作表称为输出",并且此工作表中各列的格式是一致的.
I have roughly 30 excel workbooks I need to combine into one. Each workbook has a variable number of sheets but the sheet I need to combine from each workbook is called "Output" and the format of the columns in this sheet is consistent.
我需要从第一个文件导入输出"工作表,然后附加其余文件并忽略标题行.
I need to import the Output sheet from the first file, then append the remaining files and ignore the header row.
我尝试使用glob/pandas来执行此操作,但无济于事.
I have tried to do this using glob/pandas to no avail.
推荐答案
这可能会被否决,因为这不是Python的答案,但是老实说,我不会将Python用于此类任务.我认为您最好在下面安装AddIn并将其用于工作.
This will probably get down-voted because this isn't a Python answer, but honestly, I wouldn't use Python for this kind of task. I think you are far better off installing the AddIn below, and using that for the job.
https://www.rondebruin.nl/win/addins/rdbmerge.htm
单击合并文件位置选择中的文件夹中的所有文件",然后单击使用工作表名称" =输出",最后,我认为您需要第一个单元格".祝你好运!
Click 'Merge all files from the folder in the Files location selection' and click 'Use a Worksheet name' = 'Output', and finally, I think you want 'First cell'. Good luck!
这篇关于使用python将Excel工作簿表合并为一个的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!