Leading zero's while exporting to excel

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi
In the database, field is formatted is text and the data is account no
0101893672, while exporting the data through (Query >Report) to excel format
leading zero is not visible in the excel sheet e.g 101893672.

I need to have this zero visible in the excel format, how can i do that.

Thanks in advance

Ron
 
Rony

Before you export it, in a query, convert it to a string of characters.
Leading zeros in number (real, actual, add-subtract-multiply-divide numbers)
are dropped because they're meaningless.

In your example, they aren't really numbers, but an identifier that happens
to use digit characters.

You can use the CStr() function in your query to do the conversion.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Thanks, please note I am exporting the proccessed (through query) data to
excel from my report, Data in report indicates leading zero , but when I
export to excel the leading zero is not indicated, any solution in report
format itself.

Thanks\
Ron
 
Ron

In the report definition, can you set the format of the control to the type
you want?

If not, then reconsider, and use a query as suggested.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Back
Top