|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
How to save data into MS Excel using Aspx.vb
some body can help me to solve my problem about how to save data into Ms Excel using by aspx.vb coding?
|
|
#2
|
||||
|
||||
|
|
|
#3
|
|||
|
|||
|
Quote:
Actually, i want to save my data into Ms Excel using VB6.but everytime i insert data from (textbox) and then press save button,but the message show, to replace my previous data in Ms Excel at first row.i want to save into Ms Excel row by row...at the different time.... |
|
#4
|
|||
|
|||
|
another problem.
this is my coding:
Dim oExcel As Object Dim oBook As Object Dim oSheet As Object 'Start a new workbook in Excel Set oExcel = CreateObject("Excel.Application") Set oBook = oExcel.Workbooks.Add 'Create an array with 9 columns and 1 row Dim DataArray(1 To 10, 1 To 9) As Variant Dim r As Integer For r = 1 To 10 wChNo = Val(cbChNo.Text) ' Dim wRetVal As Integer ' wRetVal = PIO821_SetChannelConfig(Val(Text2.Text), wChNo, CfgCode) DataArray(r, 1) = DateTime.Date DataArray(r, wChNo + 2) = "Hello" Next 'Next i 'Add headers to the worksheet on row 1 Set oSheet = oBook.Worksheets(1) oSheet.Range("A1:I1").Value = Array("Time", "Channel 1", "Channel 2", "Channel 3", "Channel 4", "Channel 5", "Channel 6", "Channel 7", "Channel 8") 'Transfer the array to the worksheet starting at cell A2 oSheet.Range("A2").Resize(10, 9).Value = DataArray ' 'Save the Workbook and Quit Excel oBook.SaveAs "C:\testing3.xls" oExcel.Quit when i run this code,it will appear many Excel.EXE. |
|
#5
|
||||
|
||||
|
Quote:
1. Your title says aspx.vb, which is a VB.NET code-behind file. 2. You posted your question in the .NET forum. -- Moved to Visual Basic Programming forum |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > How to save data into MS Excel using Aspx.vb |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|