My powerbuilder application create an excel document. In this document it is
a big amount of repeatedly data. To save time when creating the excel
document, I'd like my powerbuilder application to perform a "copy - paste -
paste - paste ..." - operation in the excel sheet. I manage to copy an area,
but I cant manage to paste it anywhere.
I'll be happy for every kind of help.
Regards
Hans
string cell1,cell2
cell1 = "A1:A5" // What I am copying
cell2 = "B1:B5" // Where I am pasting to
ole_1.Activate(InPlace!)
ole_1.Object.Application.ActiveSheet.Range(cell1).Value="10" // Enter data into
the cells
ole_1.Object.Application.ActiveSheet.Range(cell1).Copy() // Copy the data
ole_1.Object.Application.ActiveSheet.Range(cell2).Select // Select the
area I want to paste to
ole_1.Object.Application.ActiveSheet.paste() // Paste
the data
Hope this helps,
Joe Casale