| View previous topic :: View next topic |
| Author |
Message |
rajeshsegu Power User

Joined: 20 Dec 2005 Posts: 53
|
Posted: Fri Aug 18, 2006 4:28 am Post subject: Copy a Cell and Paste to Range |
|
|
Hello Friends,
I have got the trick to copy a range and paste it to a cell using the xRangeMovement.copyRange() method but I would like to know how to implement "Copy a Cell and past it to the range" where the content of the cell is replicated throughout the Range.
Please help me achieve this!
Thanks in advance!!
Rajesh Segu |
|
| Back to top |
|
 |
Villeroy Super User


Joined: 04 Oct 2004 Posts: 10065 Location: Germany
|
Posted: Fri Aug 18, 2006 4:53 am Post subject: |
|
|
Copy cell to cell and use fillSeries function in interface ::com::sun::star::sheet:: .XCellSeries. _________________ Rest in peace, oooforum.org
Get help on http://forum.openoffice.org |
|
| Back to top |
|
 |
rajeshsegu Power User

Joined: 20 Dec 2005 Posts: 53
|
Posted: Fri Aug 18, 2006 6:10 am Post subject: But............... |
|
|
Thanks Velleroy, nice solution, and its working!!!
But, if I want to select a small range of cells and pasting them into a larger range , how should that be done? ( just like how copypaste into a range work , eg., select two cells and copy into a range.. where the source just repeats itself...... ).
I just want to implement this feature generalizing it to copy a range/cell source and paste it into range/cell destination.
Hope you got my requirement....... any help would be appreciated.
Rajesh Segu |
|
| Back to top |
|
 |
Villeroy Super User


Joined: 04 Oct 2004 Posts: 10065 Location: Germany
|
Posted: Fri Aug 18, 2006 6:49 am Post subject: |
|
|
You know the size of the source from it's address (rCnt=EndRow-StartRow+1, cCount=EndColumn-StartRow+1)
Write a loop, copying while nextRange.EndRow < RequiredTargetRows. _________________ Rest in peace, oooforum.org
Get help on http://forum.openoffice.org |
|
| Back to top |
|
 |
|