[dba-SQLServer]Apostrophes in exported spreadsheets

Wortz, Charles CWortz at tea.state.tx.us
Thu May 29 07:27:10 CDT 2003


David,

That apostrophe tells Excel that what follows in the cell is to be
treated as text, not numbers.  If you want the cell values to be treated
as numbers, then you need to change the exporting field datatypes from
varchar to numeric datatypes.

Charles Wortz
Software Development Division
Texas Education Agency
1701 N. Congress Ave
Austin, TX 78701-1494
512-463-9493
CWortz at tea.state.tx.us



-----Original Message-----
From: David Emerson [mailto:davide at dalyn.co.nz] 
Sent: Wednesday 2003 May 28 21:17
To: dba-SQLServer at databaseadvisors.com
Subject: [dba-SQLServer]Apostrophes in exported spreadsheets

When I use the following line in an ADP linked to SQL2K, any varchar
fields 
have an apostrophe put at the front of the data -

strTableName = "dbo.ttmpLoadAllocateExp"

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel7,
strTableName, 
"C:\Sheet.xls

Does any one know why, and how can it be avoided?


Regards

David Emerson
DALYN Software Ltd
25b Cunliffe St, Johnsonville
Wellington, New Zealand
Ph/Fax (877) 456-1205 


More information about the dba-SQLServer mailing list