Calc sub : copying value from one sheet to another sheet format Problem

in a calc macro sub i read some data on one sheet then transfer it to another sheet

reading like this

For y2 = Ycol2 to Ycol2	+ 6	Rem loop on rows

	oCell = Sheet.getCellByPosition( y2 , Srow2  ).Value
    
	my_data2( 0 , col2 ) = oCell 
 
 	col2 = col2 + 1 
 
next 

then transfer it to another sheet

rem Transfer gen data to new sheet

my_range2 = ThisComponent.Sheets(1).getCellRangebyName("K20:Q20")
my_range2.setDataArray(my_data2)

the value on first sheet is 1760

but on the other sheet it shows as 176000%

1 - so how can i get the same number and format ?

2- is it possible to use sheet name instead of sheet number for
my_range2 = ThisComponent.Sheets(1).getCellRangebyName(“K20:Q20”)

thanks for feedback

Basic math: 176000 % = 176000 * 1/100 = 176000/100 = 1760 hence: Don’t format your target cell using Format Code 0% in advance.

2- is it possible to use sheet name
instead of sheet number for my_range2
= ThisComponent.Sheets(1).getCellRangebyName(“K20:Q20”)

Yes:
https://wiki.documentfoundation.org/Macros/Basic/Calc/Sheets#Get_by_name