DoCmd.TransferSpreadsheet

J

Judson Person

I am exporting a table to MS Excel. I am using office
2002.

When I export a table into Excel in each text export, the
first character is a '. I do not understand how this
character gets into the cells. Is there some condition
that must be set in the instruction?

Mail response to
(e-mail address removed)

Thanks
 
J

John Nurick

Hi Judson,

This is normal, and necessary in order to force Excel to treat values as
text even if they can be interpreted as numbers.

Normally the apopostrophe isn't a problem, because Excel doesn't display
it in the worksheet, omits it from the Value and Formula properties of
the cell, and omits it from any reference to the contents of the cell.

If you do need to be rid of it, use code like this:

Public Sub DeApostrophise()
Dim C as Excel.Range
For Each C in Selection.Cells
C.Formula = C.Formula
Next
End Sub
 

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