HXLStandard / libhxl-python

Python support library for the Humanitarian Exchange Language (HXL) data standard.
The Unlicense
41 stars 11 forks source link

Add info query for Excel files #290

Closed davidmegginson closed 2 years ago

davidmegginson commented 2 years ago

Add an exportable function that will scan an Excel file and return a list of dicts (one for each sheet) with the following information:

To support https://github.com/HXLStandard/hxl-proxy/issues/377

davidmegginson commented 2 years ago

In the end, added an info() method to hxl.input.ExcelInput that returns a list of dicts, one for each sheet, with the following properties:

It will be simple to add more information in the future, such as frozen rows and columns. This should support everything needed in https://github.com/HXLStandard/hxl-proxy/issues/377

davidmegginson commented 2 years ago

Modification: the list of sheets is under a property "sheets". A top-level property "format" also appears (currently "XLSX" or "XLS", but could be other formats in the future). That also leaves room to add additional top-level properties.