Export Access to Excel text field with numbers

D

dcr

After export from Access, the Excel column containing numbers and text has
green triangles in the cells because it is formatting the numbers as text. I
would like this column to export as General format.
 
D

Debra Dalgleish

You can change the numbers from text to real numbers, using one of the
techniques shown here:

http://www.contextures.com/xlDataEntry03.html

Or, in Access, use the TransferSpreadsheet method to send the data, and
specify one of the later Excel versions.
You can do this by creating a macro, or writing some code, e.g.:

'======================
Sub SendTableToExcel()
DoCmd.TransferSpreadsheet acExport, _
acSpreadsheetTypeExcel9, "tblCustomers", _
"c:\Data\MyExcelFile.xls", True
End Sub
'===========================

Then, add a button on an Access form, to run the macro or the code.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top