Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Treating numbers as text in a spreadsheet from Report

954693Feb 16 2016 — edited Feb 24 2016

I'm using Desformat=Spreadsheet in Reports Builder 10.1.2.02

One of the columns I'm displaying is a number with leading zeros. In the database view it is a VARCHAR2(10) column. I want to preserve the leading zeros.

In the html output file created by Desformat=Spreadsheet, the leading zeros are included. This is one example of the column from a row in which the value (0002800773) has leading zeros:

<TD ALIGN="right" DIR="LTR"><SPAN STYLE="FONT-SIZE: 8pt; FONT-FAMILY: arial; COLOR: #000000; FONT-STYLE: normal; FONT-WEIGHT: 400">0002800773</SPAN></TD>

But when I open it in Excel, the leading zeros are removed. I think it is because the number format defaults to "General":

pastedImage_0.png

If I create a csv file, the columns also default to "General". Instead of letting it default, if I open Excel and click on Data >> From Text, the Text Import Wizard opens and I'm able to change the default format from General to Text for all columns. When I do this, the leading zeros are displayed in the spreadsheet.

pastedImage_2.png

However, I want to generate the spreadsheet automatically and email it to certain users. I don't want to have to generate it manually (using Data >> From Text).

In Reports Builder, is there a way to get Excel to use a Column format of Text?

This post has been answered by 954693 on Feb 23 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 23 2016
Added on Feb 16 2016
11 comments
3,223 views