Skip to content
Advertisement

How to convert multiple excel sheets to csv python

I want to convert all the excel document(.xls) sheets into csv, If excel document has one sheet only then I am converting like as follow-

JavaScript

If my excel(.xls) document have more than one sheet i.e.('Sheet1', 'Sheet2', 'Sheet3', 'Sheet4') than how to convert all sheets into csv.

Any help would be appreciated.

Advertisement

Answer

wb.sheet_names() to get all the sheet names, and then loop it and dynamically put the name in the sheet_name

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement