agate-excel adds read support for Excel files (xls and xlsx) to agate.
- agate http://agate.rtfd.org
- Documentation: http://agate-excel.rtfd.org
- Repository: https://github.com/onyxfish/agate-excel
- Issues: https://github.com/onyxfish/agate-excel/issues
pip install agateexcel
For details on development or supported platforms see the agate documentation.
agate-excel uses a monkey patching pattern to add read for xls and xlsx files support to all
import agate import agateexcel agateexcel.patch()
table = agate.Table.from_xls('examples/test.xls') print(table) table = agate.Table.from_xlsx('examples/test.xlsx') print(table)
Both methods accept a
sheet argument to specify which sheet to create the table from.
Parse an XLS file.
- path – Path to an XLS file to load or a file-like object for one.
- sheet – The name of a worksheet to load. If not specified then the first sheet will be used.
Parse an XLSX file.
- path – Path to an XLSX file to load or a file or file-like object for one.
- sheet – The name or integer index of a worksheet to load. If not specified then the “active” sheet will be used.
The MIT License
Copyright (c) 2015 Christopher Groskopf and contributors
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.