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

ABAP ole, select column

Ronnn
Participant
0 Likes
1,431

Hi ABAP Gurus,

I want to execute some commands in Excel. I need to past some data from Excel into the sheet. Large numbers however are notated in a scientific way e.g. 3453+e10, but I want them to written in full e.g. 345383982034.

I know this can be done when the column in which the data is about to be past has properties as text. I can manage in doing this by command:

h_column 'NumberFormat' = '@'.

But I first need to select the whole column (column A), and I do not want to select a range, since I don't know the amount of lines available at run-time.

I've tried retrieving usable code from the macro that I have recorded, but I somehow can't get it working.

Anyone has an example how to fix this?

many thanks,

Ron.

Hi ABAP Gurus,

I want to execute some commands in Excel. I need to past some data from Excel into the sheet. Large numbers however are notated in a scientific way e.g. 3453+e10, but I want them to written in full e.g. 345383982034.

I know this can be done when the column in which the data is about to be past has properties as text. I can manage in doing this by command:

h_column 'NumberFormat' = '@'.

But I first need to select the whole column (column A), and I do not want to select a range, since I don't know the amount of lines available at run-time.

I've tried retrieving usable code from the macro that I have recorded, but I somehow can't get it working.

Anyone has an example how to fix this?

many thanks,

Ron.

2 REPLIES 2
Read only

jayaprakashhj
Participant
0 Likes
887

Hi,

are you passing data from Excel to internal table or from internal table to Excel?

I had this problem sometimes ago and found soln.

But let me know clearly what is your issue.

Regs,

JP

Read only

0 Likes
887

Hi Jayaprakash,

I found the answer already. To be correct (and now I have noticed the error in my post) I neede to extract data from SAP into Excel.

I solved it, by selecting the column with

call method of

          h_excel

         
'Columns' = h_column

       
exporting

          #1       
= 'A:A'.    " <--- -first column



     
call method of

          h_column

         
'Select'.

(in a nutshell). But that did the trick. Thanks for replying though!

regards,

Ron.