csv文件问题
数据库是.csv,怎样将窗口的Text1.Text~Text4.Text 输出到1.csv时,每一条记录一行,用excel打开时数据分别在A1,B1,C1,D1。。
一个例子
Dim ExcelApp As Excel.Application
Dim NewExcel As Excel.Workbook
Private Sub Command1_Click()
Set ExcelApp = CreateObject("Excel.Application")
'ExcelApp.Visible = False
Set NewExcel = ExcelApp.Workbooks.Open(App.Path + "\book1.csv")
With NewExcel
For i = 1 To 10
.ActiveSheet.Cells(i, 1) = "'" & i * 10
Next
ExcelApp.Visible = True
End With
End Sub