Solved

Coldfusion Report Builder - Excel removes leading zeros

Posted on 2007-03-29
3
721 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
  • 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 500 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

This article provides a case study on how our local youth baseball league deployed a new website, including the platform selection, implementation and benefits to the league.
Objective of This Article In 1990’s, when I was a budding software professional, I had a lot of confusion about which stream or technology, I had to choose to build my career. In those days, I had lot of confusion like whether to choose System so…
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

707 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now