Exporting Excel data: convert to text problem

Have a look at the attached.

The final step would be to select both columns and perform a Find & Replace for "$$" to blank.
 

Attachments

Your formula is certainly better, mine stutters at negative 'time' values like '-00:05:00'. For my specific purpose I would rather use 'notepad' approach and then use my utility to import data using two recordsets: rsAccess("FieldName")= rsExcel("FieldName")
Thank you
 
Whichever suits you.

You're welcome!
 
Ok, work this one out.
I have a big routine that opens up an existing Excel workbook with several worksheets in it, and each tab represents different data, some are the results of a cross tab some from straight queries. I use mainly CopyFromRecordset and the range where the data is being copied has been pre formatted.

However on occasion I will copy a query containing currency data however when I view the workbook some of the cells are converted to dates and some remain as currency.

I have also coded a format as currency on the range but it still displays them as dates.
 
I believe you will need to pre-format the worksheet (especially the Currecy columns) before exporting.
 
This has already been done in a larger area than the expected range. Then the empty rows are deleted. to shunt up so that the summations appear under the last row.
 
You mentioned it's coming from a query, if it's a simple Select query without any Unions then (as you know) the data type should be preserved. But have you tried exporting the currency field directly from the table?

You might also want to try formatting the columns in Excel as Text instead.

Have you got any sample data?
 

Users who are viewing this thread

Back
Top Bottom