Filling combobox problem

Hello,
I would like to filling the combobox with the elements in range “E7:E48”,
but I don’t understand the problem…

    oSheet = ThisComponent.getSheets().getbyname("Prova")
    oMyCombo = oSheet.DrawPage.Forms.getByName("Formulario").getByName("Id_model")
    
    oMyCombo.removeAllItems()
    
    odata = ThisComponent.getSheets().getbyname("Database").getCellRangeByName("E7:E48").DataArray
    
   oRow = odata(0)
            
	For i = LBound(oRow) to UBound(oRow)
    	
    	oMyCombo.insertItemText (i, oRow(i))
	
	Next i

Can you help me?
Thank you

Libreoffice 6

SO Win10

Perhaps you mean it?

oMyCombo.removeAllItems()
For i = LBound(odata) to UBound(odata)
    oMyCombo.insertItemText (i, odata(i)(0))
Next i

Look at the composition of the ODATA array in debug mode
image description

Yes @JohnSun,
ok so
“odata” is an 1-dimensional array…
“data(3)(0)” means the element in row 3, and column 0 correct?

How You access to debug mode?

thank you

Each element in 1-dimensional array odata is (surprise!) 1-dimensional array. In other words - odata is an array of rows, each element is an array of cells of one row - you understood absolutely correctly (with the amendment that the index 3 denotes the FOURTH row). Debug mode: F9 - set breakpoint, F7 - enable watch of variable, F5 - run macro, F8 - one step of debug, etc.

It’s clear, thank you so much!