ExcelDataReader icon indicating copy to clipboard operation
ExcelDataReader copied to clipboard

Preserve information about Excel's named ranges

Open WallaceKelly opened this issue 11 years ago • 8 comments

In Excel, one can define a "named range". It would be nice to be able to preserve those ranges in the dataset. Perhaps something like this:

let workbook = excelReader.AsDataSet(namedRangesInTheirOwnTables: true)

This could create additional tables in the DataSet, one table for each named range.

WallaceKelly avatar Sep 08 '14 15:09 WallaceKelly

That is an interesting idea. If enough people vote for it, we could do it.

Ian1971 avatar Sep 23 '14 09:09 Ian1971

I'd be happy to take this on, at least for the XLSX format. I would like to get some feedback my suggested approach, though. I can't think of a simple/elegant way without ending up reading the referenced worksheets twice. You can't do that now because you don't have random access to worksheets (it's just a forward-only cursor of forward-only cursors). I think having random access would be valuable in its own right performance-wise for large workbooks where you want only a fraction of the worksheets (my use case for this project).

Steve1961 avatar Feb 05 '15 01:02 Steve1961

I am ok with supporting random access. I think my only requirement would be that it doesn't negatively affect performance for the usual forward-only use.

Ian1971 avatar Feb 05 '15 13:02 Ian1971

Great, I'll have at it.

Steve1961 avatar Feb 06 '15 00:02 Steve1961

Thanks. Can you do it in a branch off of develop? On 6 Feb 2015 00:54, "Steve1961" [email protected] wrote:

Great, I'll have at it.

Reply to this email directly or view it on GitHub https://github.com/ExcelDataReader/ExcelDataReader/issues/25#issuecomment-73162093 .

Ian1971 avatar Feb 06 '15 07:02 Ian1971

Is this still something being looked into? I have a current requirement to find named ranges. I like the product very much and don't want to have to move to OleDb Thanks

ConradParker avatar May 29 '19 09:05 ConradParker

Hi,

Probably not in the short term.

As far as I know, the ranges are expressed as formulas, so this feature depends on issue #332 initially. Next we need to parse the formulas in order to extract the ranges. I suspect both are non-trivial, alas.

andersnm avatar May 29 '19 10:05 andersnm

Ok, many Thanks for the quick reply.

ConradParker avatar May 29 '19 14:05 ConradParker