Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Spool to Excel formatting

Former Member
0 Likes
2,301

Experts,

My report is writing output to spool. I have a field of type DFKKLOCKS-LOOBJ1 in spool output. When I download spool output to excel(using save to local file icon in SP01 Tcode) I see that value of LOOBJ1 column is not displayed as expected,

Value in LOOBJ1 Column in Spool output,

1000001350550000001000

1000001350550000002000

1000001350550000002000

Value in LOOBJ1 Column in Excel file,

1E+21
1E+21
1E+21

When I format these cells to display data in number format, I can see incorrect values as below,

1000001350550000000000
1000001350550000000000
1000001350550000000000

I am getting correct values only upon "Use Text Import Wizard" feature of Excel.

Is there a way we can display the value correctly in Excel so that users need not manually format data each time.

Thanks,

Aspire

1 ACCEPTED SOLUTION
Read only

arindam_m
Active Contributor
0 Likes
1,796

Hi,

The excel interprets them as Number. Try to display using a character variable or try doing quotes along the values when you download. As you are doing it via SP01, try downloading in TXT and then do a Text to columns another way could be to change the column format to character.

Cheers,

Arindam

Hi,

The excel interprets them as Number. Try to display using a character variable or try doing quotes along the values when you download. As you are doing it via SP01, try downloading in TXT and then do a Text to columns another way could be to change the column format to character.

Cheers,

Arindam

5 REPLIES 5
Read only

arindam_m
Active Contributor
0 Likes
1,797

Hi,

The excel interprets them as Number. Try to display using a character variable or try doing quotes along the values when you download. As you are doing it via SP01, try downloading in TXT and then do a Text to columns another way could be to change the column format to character.

Cheers,

Arindam

Read only

former_member209120
Active Contributor
0 Likes
1,796

Hi Aspire WF,

You declare like this

Data : LOOBJ1 type DFKKLOCKS-LOOBJ1.

Data : LOOBJ1 type Char32.

Your problem will be solved.

Read only

Former Member
0 Likes
1,796

Hi Aspire ,

Concatenate One Single quote with your respective field value .

like if your final output is "1000001350550000001000"  Number , Now  Concatenate one Single Quote "   1000001350550000001000  ", then try to download spool output to excel(using save to local file icon in SP01 Tcode .

Excel output :

Regard's

Smruti

Read only

0 Likes
1,796

this is an option to achieve ur requirement.

another option: you can change the cell format as text to display your content.

Read only

0 Likes
1,796

Dear All,

Thanks a ton for all your replies. I would try out all your suggestions & will keep you posted with my results.

Thanks,

Aspire