Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to enforce data types on export to excel

Status
Not open for further replies.

tekkyun

Technical User
Oct 23, 2003
122
GB
Hi,
I have several reports which users can choose to export to excel. To do this I use:-
DoCmd.OutputTo acOutputReport, stDocName, acFormatXLS

These reports have been working fine but I have now come across a problem.
Some of the text data fields have letters embedded with a series of numbers, eg 1234E123. When this is exported to Excel, it is automatically converted to scientific number format.
I have tried concatening the field with leading space prior to export to force conversion to text format but this didn't have any effect.

Does anyone know of an easy way to overcome this?
 
Yes, that works but it looks a bit odd on the xls file.
Is there an 'invisible' character that I could use instead?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top