I have found sometimes but not always, Excel puts a $ at the end of a worksheet name but that is not seen in Excel, only when trying to import it into SQL Server using C#. I've run into a number of different scenarios with this.
$ at the end.$' is appended to the name.$ and there is another copy with $_filteredDatabase appended. (I was able to find that _filteredDatabase is where Excel stores the 'filtered' data.) The reason I ask is in the past I've been able to tell my application to import if there is only 1 worksheet or if it does not end in $. However there have been a few times that I've ended up with a "worksheet$" and a "worksheet$_".
So I'm just wondering if anyone knows what the $ is or why/when it gets added?
When you use Excel Source -Excel source extracts data from worksheets or ranges in Microsoft Excel workbooks- SQL Server Books-Online says:
Important:
In Excel, a worksheet or range is the equivalent of a table or view. The list of available tables in the Excel Source and Destination editors displays existing worksheets (identified by the$sign appended to the worksheet name, such asSheet1$) and named ranges (identified by the absence of the$sign, such asMyRange).
or
Data sources
The source of data in an Excel workbook can be a worksheet, to which the$sign must be appended (for example,Sheet1$), or a named range (for example,MyRange). In a SQL statement, the name of a worksheet must be delimited (for example,[Sheet1$]) to avoid a syntax error caused by the$sign. The Query Builder automatically adds these delimiters. When you specify a worksheet or range, the driver reads the contiguous block of cells starting with the first non-empty cell in the upper-left corner of the worksheet or range. Therefore you cannot have empty rows in the source data, or an empty row between title or header rows and the data rows.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With