cancel
Showing results for 
Search instead for 
Did you mean: 

Powerbuilder, OLE object, Excel, problem in copy and paste

0 Kudos

Hi All,

I found that if something is copied in clipboard outside of the program while below program is running between "copy" and "paste", then the "something" is pasted in the final output file which is not correct.

Is there any way to avoid it? Using a shared clipboard at the same time is the problem here. but I can't find solution.

Please advise. Thank you in advance.

// Combine Sheets into one excel file

FOR li_n = 1 TO 8

lole_TempWorkBook = lole_excel.WorkBooks.Open(is_currDirectory+as_filename_tab[li_n]) lole_TempWorkBook.WorkSheets(1).Cells.Select

lole_excel.CutCopyMode = False

lole_TempWorkBook.WorkSheets(1).Cells.Copy <=========================

lole_MainWorkBook.Activate

lole_sheet = lole_MainWorkBook.WorkSheets(li_n)

lole_sheet.Name = ls_tabname[li_n]

lole_sheet.Paste <=========================

//lole_sheet.Cells.EntireColumn.AutoFit

lole_excel.CutCopyMode = False

lole_TempWorkBook.Close(False)

NEXT

former_member751591
Participant
0 Kudos

Welcome to the SAP Community! We wanted to give you the opportunity to take the tutorial to get started in SAP Community, as it provides tips for preparing questions that draw responses from our members.

Additionally, by adding a picture to your profile you encourage readers to respond to your question. Learn more about your profile using Profile Tutorial

Thank you!

Accepted Solutions (0)

Answers (0)