Home > other >  The python copy the entire excel worksheets
The python copy the entire excel worksheets

Time:10-22

With copy_worksheet old quote error AttributeError: Workbook object has no attribute copy_worksheet

CodePudding user response:

Copy of the premise is you have to copy him with an empty table, try to create an empty sheet first

CodePudding user response:

reference 1st floor Swing0_0 response:
copy the premise is you have to copy him with an empty table, create an empty sheet first try

I created, I think you copy the function to import what library, I only import openpyxl

CodePudding user response:

Copy the files of a certain table,
Can use the pandas library read, then save_to

CodePudding user response:

reference archaeologists lx reply: 3/f
copy the files in a table,
Can use the pandas library read, then save_to

I also used pandas, can have a try, thanks

CodePudding user response:

Openpyxl have copy function of the sheet, I remember I have written a similar program

CodePudding user response:

reference 5 floor Swing0_0 reply:
openpyxl have copy function of the sheet, I remember I have written a similar program

I just wonder if the import openpyxl library is not enough, still have to specifically for copy import something

CodePudding user response:

No, use openpyxl enough
https://blog.csdn.net/u014192870/article/details/105933685? Utm_medium=distribute. Pc_relevant. None - task - blog - BlogCommendFromMachineLearnPai2-1. Nonecase& Depth_1 - utm_source=distribute. Pc_relevant. None - task - blog - BlogCommendFromMachineLearnPai2-1. Nonecase
consult

CodePudding user response:

https://pandas.pydata.org/docs/reference/api/pandas.read_excel.html#pandas.read_excel

https://pandas.pydata.org/docs/reference/api/pandas.ExcelWriter.html#pandas.ExcelWriter



  • Related