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.
- It leaves the original worksheet but also creates a second empty 'hidden' worksheet with the
$
at the end. - There is only 1 worksheet and it has the data but the '
$
' is appended to the name. - The original worksheet is there with the
$
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:or
It means that the row or column which comes after the dollar sign is anchored or absolute in the mentioned sheet.
for Example: [Sheet1$A1:B4] means referring particular range from Sheet if u want to get range of data needs to give like above
Example1: [Sheet1$] means referring all row and columns from Sheet1