rangerbud249
Active member
- Joined
- Aug 18, 2004
- Messages
- 27
- Programming Experience
- Beginner
hello,
I am trying to write to an Excel sheet some information.
on sheet 1 I would like names
on sheet 2 I would like addressess
How can I save information on sheet2, sheet3, and so on.
I used this but it only goes up to sheet 3 and I need more than 3 sheets:
<
Dim app As New Excel.Application
app.Visible = True
Dim name As String
name = "Fleet_Material_Station_Consumption"
Dim doc As Excel.Workbook = app.Workbooks.Open("C:\Temp\" & Path.GetFileNameWithoutExtension(name) & ".xls")
ed1 += 1
Dim sheet As Excel.Worksheet = doc.Sheets(ed1)
>
thanks
I am trying to write to an Excel sheet some information.
on sheet 1 I would like names
on sheet 2 I would like addressess
How can I save information on sheet2, sheet3, and so on.
I used this but it only goes up to sheet 3 and I need more than 3 sheets:
<
Dim app As New Excel.Application
app.Visible = True
Dim name As String
name = "Fleet_Material_Station_Consumption"
Dim doc As Excel.Workbook = app.Workbooks.Open("C:\Temp\" & Path.GetFileNameWithoutExtension(name) & ".xls")
ed1 += 1
Dim sheet As Excel.Worksheet = doc.Sheets(ed1)
>
thanks