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

Problem when transfer data into excel

Former Member
0 Likes
1,650

Hi all,

I saved some entries in an internal table and transferred into an excel file successfully. However, the format of some field was not what I want. I saved an identity number( 18 characters long ) and the excel automatically regarded it as an interger and expressed in the format '4.20102E+17' and it does not work if I widen the cell.

Could anyone give some suggestion on it, thx.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,327

Hi

That cell values it takes as default format. You change cell format as required format.

Select the cell->Right click->Format cells->Number tab->general or Number.

Thanks & Regards

Md.Mahaboobkhan

9 REPLIES 9
Read only

Former Member
0 Likes
1,327

Hi,

Select the cell->Right click->Format cells->Number tab->general or Number.

Read only

0 Likes
1,327

Hi,

thx. Sorry, I forget to say that I don't want to do some setting after opening the excel. And I had tried this way before, it will omit the last three digits.

Read only

0 Likes
1,327

Hi Bin,

One way around is you can add a single column ( ' ) to your idenity number. that is using concatenate keyword. which will keep the text as it is in excel sheet (without ' in final output)

Other way is - >As you are passing the correct data only. It's the limitataion with Excel only. Although, the data is also correct in Excel sheet 4.711E+17 or 4700025000000000 (18 char) is one of the same thing. and in case of calculation it will fetch you the excat result.

In case, you want it to display you have to do some modifications in Excel sheet.

Select the particular column->Right Click->Format cells->Number and select the decimal places as 0 and it will not ommit any digit at the end.

Regards,

Sachin

Read only

0 Likes
1,327

Hi Sachin,

Does the first way mean that I should merge two columns together? I try to concatenate single quotation mark into the identity number, it does work, however, the output has the quotation mark displayed. The current solution is just add some space into it to claasify.

The other way does not work on my excel file. I don't know if there exists any difference between our programs. It has omitted the last three digit before opening the file.

Anyway, thanks a lot!

Regards,

Bin

Edited by: Bin Zhou on Dec 30, 2008 9:59 AM

Read only

Former Member
0 Likes
1,327

Hi,

Try this first delete the entry from that cell '4.20102E+17', select the column in which this cell is present - Right click and set the properties of that column to store as 'Text.' Then again paste your numbet in that cell. Surely it will work.

regards,

Vinod

Read only

Former Member
0 Likes
1,328

Hi

That cell values it takes as default format. You change cell format as required format.

Select the cell->Right click->Format cells->Number tab->general or Number.

Thanks & Regards

Md.Mahaboobkhan

Read only

0 Likes
1,327

Hi Mohammad,

Thanks for your suggestion all the same although the problem was accepted by the customer at the end.

However I think it should work cause as far as the format of the data is concerned, if excel interpret the data as text as your suggestion, there will be no round problem any more.

By the way, as I know later, if you put a ' at the beginning of the data, it should be interpreted as text.

Read only

Former Member
0 Likes
1,327

Hi,

Instead of downloading directly in XLS format, make it into TXT file initially and later convert into XLS.

Regards,

Prasanth

Read only

_IvanFemia_
Active Contributor
0 Likes
1,327

Hi,

I know that question is just answered, but I give you these infos:

try to read these blogs

[abap2xlsx - Generate your professional Excel spreadsheet from ABAP|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/20046] [original link is broken] [original link is broken] [original link is broken];

[xlsx2abap - Read and edit your Excel files from ABAP|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/20791] [original link is broken] [original link is broken] [original link is broken];

Code of this SCN Community project is shared on [Code Exchange|https://cw.sdn.sap.com/cw/groups/abap2xlsx]

Regards

Ivan