Sylvan.Data.Excel
Sylvan.Data.Excel copied to clipboard
want to be able to set ExcelDataReader.SheetNames PUBLIC
For some usage scenarios, I want to be able to set the access scope for SheetInfo[] sheetNames in ExcelDataReader to public,
Now I can only use the source code to get SheetInfo[]
For some usage scenarios
Can you describe the scenario?
My English is written through translation, maybe the vocabulary is not particularly accurate.
For example, my users spread their data across multiple sheets, and sometimes no, I want to be able to choose which sheets to import based on the user's discretion, so I want to get the sheet List
This is a reasonable request, but I'll have to give it some thought. I don't want to just make the sheet names public, because I feel like for this to be useful, a user would also want to "open" each specific sheet. Currently the "NextResult" is the way to do this, but that only allows moving forward through the sheets. If someone opened a specific sheet, what should happen when NextResult is called? Presumably, it would move to the next sheet.
For now, you can open the sheet twice: the first time through call NextResult and WorksheetName to get the ordered list of worksheets. Then, close and reopen the file and use the sheetnames to provide the user options.
You're right, we're more of a financial business, where multiple pieces of data are mixed into one file through different worksheets, so you need to specify a specific sheet for import.
It is possible to open the sheet twice. I can work like this for a while.
@MarkPflug Hello, do you have a plan to disclose the ExcelDataReader.SheetNames
No, I don't have any immediate plans to add this feature.
This is being added in 0.4.6-b0001 (prerelease currently).
ExcelDataReader now has a "WorksheetNames" enumeration, and a TryOpenWorksheet(string name)
method.
Not sure when the final 0.4.6 build will be released, there are some other things I'm trying to incorporate.
Wow, finally support. Thank you very, very much