Open mjkallen opened 8 years ago
Hi @mjkallen,
thanks for getting in touch! I'm open to introduce a backwards-incompatibility for the sake of a cleaner and simpler API. I would be happy to review an appropriate pull request. Before releasing, I would get in touch with the maintainers of packages depending on XLConnect to make sure they have enough time to adapt accordingly.
Let me know what you think.
Thanks & Best regards, Martin
Hi Martin,
it turns out that my client doesn't like using tables anyway, because they slow things down too much. So for now there is no pressing need to implement this. One other approach you could use is to add a function which returns the name (or index) of the worksheet which contains the named region (or table). I believe that the POI library has a method for that. You could then use this if the sheet
argument is not provided.
Regards,
Maarten-Jan
The
readTable()
function in the package requires the sheet index or name to be provided, but table names must be unique in an Excel workbook and thus theXSSFWorkbook
Java class in the POI library has a getTable(java.lang.String) method which returns an object of classXSSFTable
.I'm tempted to submit a pull request which adds this feature, but unfortunately the generic function
readTable
requires a value for thesheet
argument to be provided. Making this argument optional would introduce backward incompatibilities, especially since it would be more natural to switch the order of thesheet
andtable
arguments. One solution could be to assume that negative values forsheet
indicate that tables should be looked up by their name only.Any thoughts on this suggestion?