Solved

Coldfusion Report Builder - Excel removes leading zeros

Posted on 2007-03-29
3
734 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 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

733 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