Un Esempio, potrebbe essere questo
codice:
Imports Microsoft.Office.Interop
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim oXL As Excel.Application
Dim oWB As Excel._Workbook
Dim oSheet As Excel._Worksheet
Dim Lettera As String = "E"
Dim Row As Integer = 1
Try
oXL = New Excel.Application()
oXL.Visible = True
oWB = DirectCast(oXL.Workbooks.Add, Excel._Workbook)
oSheet = DirectCast(oWB.ActiveSheet, Excel._Worksheet)
For i As Integer = 0 To 100
For y As Integer = 0 To 7
oSheet.Cells(Row, 1) = Lettera & " " & i.ToString & "." & y.ToString
Row += 1
Next
Next
Lettera = "A"
Row = 1
For i As Integer = 0 To 100
For y As Integer = 0 To 7
oSheet.Cells(Row, 3) = Lettera & " " & i.ToString & "." & y.ToString
Row += 1
Next
Next
Lettera = "M"
Row = 1
For i As Integer = 0 To 100
For y As Integer = 0 To 7
oSheet.Cells(Row, 5) = Lettera & " " & i.ToString & "." & y.ToString
Row += 1
Next
Next
oXL.Visible = True
oXL.UserControl = True
Catch theException As Exception
End Try
End Sub
End Class
ma dovrai ovviamente adattarlo alle tue esigenze.
facci sapere...
Ciao