Hi Group:
Hope this is the right forum...
Occasionally, when I write data to a linked Excel file from a varchar(50)
field, it arrives with a preceding single apostrophe (') in Excel. Doesn't
seem to have the tick in SQL when I view in QA. Any ideas why this would be,
or how I can avoid that?
Thanks!
eric db
Eric,
The apostrophe has to do with the leading zeros in you data, in Excel (and I
believe in 2003 version, it's no longer happening), Excel treats the values
in order not to lose them, thus puts the apostrophe in front. You want to
make sure that the Excel column is formatted for the data type you wanted to
be formatted before pouring the data in.
Hopefully, it helped.
"eric db" wrote:
> Hi Group:
> Hope this is the right forum...
> Occasionally, when I write data to a linked Excel file from a varchar(50)
> field, it arrives with a preceding single apostrophe (') in Excel. Doesn't
> seem to have the tick in SQL when I view in QA. Any ideas why this would be,
> or how I can avoid that?
> Thanks!
> eric db
|||Excel does this to indicate the cell value should be treated as text -
but what you've passed in is probably convertible to an int or
something, so Excel explicitly states it's text by adding the (')
Simon Worth
eric db wrote:
> Hi Group:
> Hope this is the right forum...
> Occasionally, when I write data to a linked Excel file from a varchar(50)
> field, it arrives with a preceding single apostrophe (') in Excel. Doesn't
> seem to have the tick in SQL when I view in QA. Any ideas why this would be,
> or how I can avoid that?
> Thanks!
> eric db
Monday, March 26, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment