Hi All, I use the below, just for basic reading of xls works well.
http://code.activestate.com/pypm/xlrd3/ https://github.com/JoiDegn/xlrd3 1. Not sure if is the best, but reads xls 2. Limitations: does not work with xlsx, not sure about macros. 3. You do not need windows but the users would need an application to open xls (MS Office ?) 4. Looks like: from xlrd3 import open_workbook FO_XLSSpreadSheet = open_workbook("PatchSchedule.xls") print ('Opening workbook PatchSchedule.xls...') FO_XLSSheettoReview = FO_XLSSpreadSheet.sheet_by_name('Sheet1') # print values of the first column (0) for all rows for fn_RowIndex in range(FO_XLSSheettoReview.nrows): # if all the cell have a text or number value if FO_XLSSheettoReview.cell(fn_RowIndex,0).ctype == 1: print (FO_XLSSheettoReview.cell(fn_RowIndex,0).value) elif FO_XLSSheettoReview.cell(fn_RowIndex,0).ctype == 2: print(str(FO_XLSSheettoReview.cell(fn_RowIndex,0).value)) else: print ('? Find my type') All the best Sergio. -----Original Message----- From: melbourne-pug [mailto:[email protected]] On Behalf Of Javier Candeira Sent: Tuesday, 4 February 2014 2:29 PM To: Melbourne Python Users Group Subject: [melbourne-pug] Excel spreadsheet munging under Linux. Limits? At work I need to manipulate a series of excel spreasheets, and I seem to remember that people have discussed the topic in a meeting. I have two questions to anyone who's already had to do the same: - What's the current best Python library for excel manipulation? - Are there any limitations for handling Excel sheets under Linux? What kind of thing would I need Windows (and presumably, a live copy of Office) for? As background for the question, I'm trying to avoid using Windows at all. My ideal workflow would involve users downloading generated spreadsheets from a webserver. Thanks, Javier _______________________________________________ melbourne-pug mailing list [email protected] https://mail.python.org/mailman/listinfo/melbourne-pug _______________________________________________ melbourne-pug mailing list [email protected] https://mail.python.org/mailman/listinfo/melbourne-pug
