Copy and paste in Excel?

Kris Sercu

New Member
Hi,

I have to make an Excel report containing data coming from a Progress database.
I'm able to send the data to Excel without problems but it's just rough data for the moment.
But: the list should be printed with a certain layout, title lines, total lines, etc.
I don't want to start doing lay-out in Excel from within Progress, so I'm thinking about the following solution.

I'm using an excel document with 2 sheets:
- sheet A will contain the data
- sheet B contains some formatted title lines, headers, total lines...

For example, what I want to do is let Progress copy a formatted total line from sheet B to A and then let the Progress program fill the the line with the appropriate data. So I don't have to format each cell separately from within Progress.
I don't seem to be able to do it though...
Here's how I see it:
- select sheet B
- select a range of cells
- copy the contents to the clipboard
- select sheet A
- paste the content I just copied on the desired position

Here's my code i copied from an Excel macro and 'adjuested' it to Progress (hSHEET1 refers to sheet A and hSHEET2 to sheet B, this part works hehe)
hSHEET2:Range("A1:BI10"):Select.
hSHEET2:Selection:Copy.
hSHEET1:Range("A1"):Select.
hSHEET1:Paste.

I get the following error: "Method of class Range failed" (error number 5890).

Anyone have some ideas how I should te be able to solve the problem?

Many thanks!!
Kris
 
Back
Top