2013 Dec 18 1:45 PM
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.
2013 Dec 19 8:22 AM
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
2013 Dec 19 4:03 PM
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.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |