[Google Translate] Bonjour Julien,
Attached est un exemple qui montre les lignes sélectionnées dans une boîte de liste Xojo et affiche les valeurs dans Excel.
Lorsque le numéro 10 est sélectionné, Excel affichera 10,12,14.
Lorsque le numéro 6 est sélectionné, Excel affichera 6,8,10,12,14
La publication de la liste dans Xojo est avec le code suivant:
[English]Hello Julien,
Attached is an example which shows the rows that were selected in a Xojo Listbox and shows the values in Excel.
When the number 10 is selected, Excel will show 10,12,14.
When the number 6 is selected, Excel will show 6,8,10,12,14
Populating the listbox in Xojo is with the following code:
me.Heading(0) = "Numbers"
Dim i as Integer
For i = 4 to 14 Step 2
me.AddRow i.ToText
Next i
[Google Translate]La présentation des données dans Excel est avec le code suivant:
[English] Showing data in Excel is with the following code:
If Listbox1.ListIndex <0 then
MsgBox "Please select a number in the listbox"
Return
End If
Dim Excel as new ExcelApplication
Excel.Visible = True
Excel.Workbooks.Add
Dim i as Integer
Dim j as integer = 1
For i = Listbox1.ListIndex to Listbox1.ListCount-1
Excel.Cells(j,1).Value = Listbox1.Cell(i,0)
j = j + 1
Next i
[Google Translate] Télécharger le programme
[English] Download program
ExcelIncrement