Solved

Coldfusion Report Builder - Excel removes leading zeros

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

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