I have a workbook with multiple sheets, and each sheet has the same set of named ranges (IE they are scoped to the sheet, not workbook).
I want to query based on a n
Would it be possible to use an excel range instead of named range? I got the following to work:
SELECT * FROM [Report 1$A4:P]
I'm getting the sheet name from the GetOleDbSchemaTable() method and removing the apostrophes. The sheetname with apostrophes does not work for me with a range.
if (tableName.Contains(' '))
tableName = Regex.Match(tableName, @"(?<=')(.*?)(?=\$')", RegexOptions.None).Value + "$";