How can I copy one excel file data to another excel file by excluding hidden rows content using Python

Kishore JK kishorejk1987 at gmail.com
Wed Oct 19 05:30:23 EDT 2016


I need to copy one excel file data into another excel file by excluding rows which were hidden in source excel file.

https://i.stack.imgur.com/NPUK6.png

As shown in the image, from the source excel file, I need to copy the data of row numbers 116,135 and 139 and exclude all the remaining rows which were hidden because of not matching the criteria.

I have tried below code, but this is copying entire data into new excel sheet.
wb = openpyxl.load_workbook('sourcefile.xlsx')
sheet = wb.active
sheet.title = 'Sheet1'
wb.save('destinationfile.xlsx')



More information about the Python-list mailing list