Skip to content Skip to sidebar Skip to footer

Selecting Multiple Specific Columns In Excel And Exporting To Csv Using Python

I'm trying to extract 3 columns in a large excel spreadsheet and export it to CSV format. I have XLRD but have found that there are no column specific tools I can use (Or maybe I j

Solution 1:

Try that for exporting the 2nd and 3rd column as an example

...    
for rownum in xrange(sheet.nrows):
        wr.writerow([sheet.cell(rownum, 1).value, 
                     sheet.cell(rownum, 2).value])  

Post a Comment for "Selecting Multiple Specific Columns In Excel And Exporting To Csv Using Python"