[AccessD] VB6/VBA & OpenOffice - Copy A Range Of Cells From One Sheet To Another Sheet

Paul Hartland paul.hartland at googlemail.com
Mon Jun 29 08:47:30 CDT 2020


To All,

I would be pulling my hair out with this one by now if I hadn't got the
clippers on it the weekend, I am trying to copy one range of cells from a
selected sheet to another blank sheet and the code below works, so happy
days, however it only copies the actual data and not the formatting, anyone
ever played with something like this and managed to copy the formatting as
well as the data, I have to do it for MS Excel as well, but I think I have
code for that somewhere so can't see that being a problem, but this with
OpenOffice is driving me insane at the moment.

Set objXLOORangeSource =
sXLSheetSource.getCellRangeByPosition(lngSourceColStart, lngSourceRowStart,
lngSourceColFinsh, lngSourceRowFinish)
' Set target range of cells
Set objXLOORangeTarget =
objXLOOSheetTarget.getCellRangeByPosition(lngSourceColStart, 0,
lngSourceColFinsh, lngTargetRowFinish)
objXLOORangeTarget.setDataArray (objXLOORangeSource.getDataArray())

Thanks in advance for any help.


-- 
Paul Hartland
paul.hartland at googlemail.com

<http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Virus-free.
www.avg.com
<http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>


More information about the AccessD mailing list