on 08-04-2006 10:26 PM
Hi,
I use the Method below to create my ranges in Excel.
CALL METHOD spreadsheet->insert_range_dim
EXPORTING name = 'LIFNR'
top = top
left = left
rows = rows
columns = columns
updating = updating
no_flush = no_flush
IMPORTING error = error
retcode = retcode.
second Ranges Name;
CALL METHOD spreadsheet->insert_range_dim
EXPORTING name = 'MATNR'
top = top
left = left
rows = rows
columns = columns
updating = updating
no_flush = no_flush
IMPORTING error = error
retcode = retcode.
After that I use method below to get the names into
t_ranges. Till Now everything is ok.
CALL METHOD cl_spreadsheet->get_ranges_names
IMPORTING
error = error
ranges = t_ranges.
But I just had to change the ranges Names depending on
New Requirements.
So I have changed the Ranges names with method again like this ( I need this time only one Range);
CALL METHOD spreadsheet->insert_range_dim
EXPORTING name = 'MAKTX'
top = top
left = left
rows = rows
columns = columns
updating = updating
no_flush = no_flush
IMPORTING error = error
retcode = retcode.
After this I call Method below to get the name into t_range.
CALL METHOD cl_spreadsheet->get_ranges_names
IMPORTING
error = error
ranges = t_ranges.
But This Time it brings me LIFNR and MAKTX into t_ranges,
although I think I would see only MAKTX in t_ranges.
What is wrong? Why has t_ranges LIFNR and MAKTX? t_ranges has to have only MAKTX.
Do I have to clear the control or other
Elements and how?
Thanks for all.
with my best Regards
Maybe you should be clearing the t_ranges just before adding MAKTX.
clear t_ranges. refresh t_ranges.
REgards,
Rich HEilman
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am using this method and it works in my application under ECC 5.0.
here is a sample from my code...
refresh: gt_soi_range_list.
clear: gt_soi_range_list.
gt_soi_range_list-name = 'DATA1'.
call method gh_oi_spreadsheet->delete_ranges
exporting
no_flush = ''
ranges = gt_soi_range_list
importing
error = gh_oi_error
retcode = gh_oi_retcode.
call method gh_oi_error->raise_message
exporting
type = 'E'.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.