?
Solved

Coldfusion Report Builder - Excel removes leading zeros

Posted on 2007-03-29
3
Medium Priority
?
743 Views
Last Modified: 2013-12-20
Using ColdFusion Report Builder, I am producing an excel report. The excel report is stripping out leading zeros from a text field. For instance, the data looks like this: 000006456 When it is put into excel, it looks like this: 6456
0
Comment
Question by:Nigel-SA
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 1

Expert Comment

by:sagergaard
ID: 18815109
This is because Excel tries to help, and says "This could be a number. I'll make it a number."
Make sure the columns format is set to Text.  (rightclick on the column and choose Format cells.
0
 
LVL 1

Accepted Solution

by:
sagergaard earned 1500 total points
ID: 18815122
Another possibility could be to use a ' in front of the 000006456. This way Excel is forced to display the whole "number". And it still hides the '.
0
 

Author Comment

by:Nigel-SA
ID: 18816032
Thanks you gave us an idea, in ColdFusion Report Builder use the statement below to kick a ' before the number so excel sees it as a text field.

Insert("'", query.FIELD, 0)
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question