I am trying to copy 3 columns from a grid datawindow to the clipboard to use to paste to Excel
When I run through this code:
DO WHILE lv_l_row > 0
// Concatenate all selected fields into one string to be put into the
// clipboard. Within a row, fields are delimited by tabs. Rows are
// delimited by carriage control/line feed.
//These local variables are set above
lv_s_line = &
lv_s_acct_nbr + &
lv_s_tab + &
lv_s_dept_nbr + &
lv_s_tab + &
lv_s_pct + &
gv_str_const.crlf
//Make sure the lv_s_line is not null. If it is then skip it. The reason for this is because if it is null then it will blank out lv_s_copy_string
//of all existing values.
IF NOT(IsNull(lv_s_line)) THEN
lv_s_copy_string = lv_s_copy_string + lv_s_line
END IF
// Get next selected row
lv_l_row = lv_dw_list.GetSelectedRow(lv_l_row)
LOOP
Clipboard(lv_s_copy_string)
I can see that lv_s_copy_string contains the data that I want copied to the clipboard, but when I try pasting the contents of the clipboard into Excel, nothing is pasted.
Is there something that I am forgetting to do to copy the data I want to the clipboard? I have also tried using Super::Clipboard("").. Any help would be appreciated!!!
When I run through this code:
DO WHILE lv_l_row > 0
// Concatenate all selected fields into one string to be put into the
// clipboard. Within a row, fields are delimited by tabs. Rows are
// delimited by carriage control/line feed.
//These local variables are set above
lv_s_line = &
lv_s_acct_nbr + &
lv_s_tab + &
lv_s_dept_nbr + &
lv_s_tab + &
lv_s_pct + &
gv_str_const.crlf
//Make sure the lv_s_line is not null. If it is then skip it. The reason for this is because if it is null then it will blank out lv_s_copy_string
//of all existing values.
IF NOT(IsNull(lv_s_line)) THEN
lv_s_copy_string = lv_s_copy_string + lv_s_line
END IF
// Get next selected row
lv_l_row = lv_dw_list.GetSelectedRow(lv_l_row)
LOOP
Clipboard(lv_s_copy_string)
I can see that lv_s_copy_string contains the data that I want copied to the clipboard, but when I try pasting the contents of the clipboard into Excel, nothing is pasted.
Is there something that I am forgetting to do to copy the data I want to the clipboard? I have also tried using Super::Clipboard("").. Any help would be appreciated!!!