Dim XLS As New Excel. Application
Dim oBook As New Excel. The Workbook
Dim oSheet As New Excel. The Worksheet
Dim the fs As New Scripting. FileSystemObject
Dim I, j As Integer
Dim aTemp1 () As String
Dim aTemp2 () As String
Dim aTemp3 () As String
Dim strSql As String
Dim cn As New ADODB. Connection
Dim the rs As New ADODB. You
Dim aFieldName () As String
'create file
If IsNull (strPath) Or strPath="" Then
FunWriteExcelData=https://bbs.csdn.net/topics/False
The Exit Function
End the If
AFieldName ()=Split (strFieldName, ", ")
ATemp1 ()=Split (strData, "$")
ATemp3 ()=Split (aTemp1 (0), "#")
ReDim aTemp2 (UBound (aTemp1), UBound (aTemp3)) As String
For I=0 To UBound (aTemp1) - 1
ATemp3 ()=Split (aTemp1 (I), "#")
For j=0 To UBound (aTemp3)
ATemp2 (I, j)=aTemp3 (j)
Next
Next
If CheckFile (strPath)=False Then
XLS. Workbooks. Add
XLS. DisplayAlerts=False
XLS. Workbooks (1). SaveAs strPath
XLS. Workbooks (1). The Close
End the If
Debug backwardness now XLS. Workbooks. Add error, with different versions of the office, or at the same error