Exporting to excel from Access
I export from Access into Excel regularly. There are times when a
numeric value stored in a text-formatted Access table field gets
exported to Excel. When that happens, I get a single quote prepended
to the number in the Excel worksheet.
To solve this problem, you define a range, then you loop through each
cell in the range and apply a number format and convert to double. But
is it the application of the format or the type conversion that removes
the quote?
I'm also curious why the value is assigned to a formula:
rngCurrent.Formula = rngCurrent.Value
And I assume you are recalculating any formulas with this:
Application.Calculation = xlCalculationAutomatic
once you complete the loop.
Is this correct?
|