Exporting Text with a variable Number of Leading Zeros

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

Guest

Greetings!

I am trying to export data that has a variable number of leading zeros. The
export into Excel always drops the zeros which I wish to retain. The data
type is set to text. When I export the report to a "txt" file and then import
into Excel I am able retain the zeros.

Question, is there a way to export this data from a report directly into
Excel and retain the leading zeros?

Thanks for any help you may be able to provide to me.
 
Hi Stephen,

Set up a query that sticks an apostrophe in front of each value, e.g.

'007

These values should transfer to Excel as text.
 
Thanks John I will try that.

Any idea as to why this is necessary if the data type is set to text?

Thanks,

Stephen
 
Excel cells don't have data types in the same sense as in fields in
database tables. When Excel finds something that looks like a number, it
usually treats it as a number.
 

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

Back
Top