Ask Your Question

Revision history [back]

You can try with something like this...

function bgcolor()
total=2556

for I=1 To total

   s=ThisComponent.sheets.getbyname("Sheet1")
   cell=s.getCellRangeByName("A"&I)
   bgcolor=cell.cellBackColor   
   dest=s.getCellRangeByName("O"&I)
   dest.String=bgcolor

next I

end function

Where total is the length of the column A..

The column A is the origin and O is the destination column ...

Sheet1 is the name of the "Working sheet"

I know it's the simplest code of the world,but it works ...