Reading a cell in sheet1 writing the value in sheet2

I want to address a simple code for addressing two sheets. Like:

osheet2.GetCellByPosition(c1,r1) = osheet1.GetCellByPosition(c2,r2)

I have two named sheets in the document

I have to assign values to the osheet1 and osheet2 so that they point to the two sheets.
I have seen solutions with:
…dispatcher = createUnoService(“com.sun.star.frame.DispatchHelper”)…

but I have no idea what happens there and there must be a more direct and more transparent way

…just like in your previous question: There a three types of cell content (oCell.Type):

# of type  type
1          value (numerical)
2          string
3          formula

I don’t understand perfectly what you want, something like this?

osheet2.GetCellByPosition(c1,r1).String = osheet1.GetCellByPosition(c2,r2).String

the same with Value/Formula etc.

osheet2.GetCellByPosition(c1,r1).Formula = osheet1.GetCellByPosition(c2,r2).Formula