Python for Excel by Felix Zumstein

Python for Excel by Felix Zumstein

Author:Felix Zumstein
Language: eng
Format: epub, pdf
Publisher: O'Reilly Media
Published: 2021-03-25T00:00:00+00:00


In [29]: # Read in a range of cell values by using our excel module data = excel.read(sheet, "B2") data[:2] # Print the first two rows

Out[29]: [['Store', 'Employees', 'Manager', 'Since', 'Flagship'], ['New York', 10.0, 'Sarah', datetime.datetime(2018, 7, 20, 0, 0), False]]

Used Range

Unlike OpenPyXL and pyxlsb, xlrd returns the dimensions of cells with a value, instead of the used range of a sheet when using sheet.nrows and sheet.ncols. What Excel returns as used range often contains empty rows and columns at the bottom and at the right border of the range. This can, for example, happen when you delete the content of rows (by hitting the Delete key), rather than deleting the rows themselves (by right-clicking and selecting Delete).



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.