G
Guest
I had a application in Vb 6.0, but is not working any more, because we are
using Office 2003. I development a new aplicacion with vb.2003 but I have a
problem in this section
oExcelApp.Workbooks.OpenText(FileName:=Warchivotxt, Origin:=437,
StartRow:=1, DataType:=xlDelimited, TextQualifier:=xlDoubleQuote,
ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=False, Comma:=False,
Space:=False, Other:=False, FieldInfo:=Array(Array(1, 3), Array(2, 3),
Array(3, 1), Array(4, 3), Array(5, 3), Array(6, 1), Array(7, 3), Array(8, 2),
Array(9, 2), Array(10, 2), Array(11, 2), Array(12, 2), Array(13, 2),
Array(14, 2), Array(15, 2), Array(16, 2), Array(17, 2), Array(18, 1),
Array(19, 1), Array(20, 2), Array(21, 2), Array(22, 2), Array(23, 2),
Array(24, 2), Array(25, 1), Array(26, 2), Array(27, 1), Array(28, 1),
Array(29, 1), Array(30, 1), Array(31, 1), Array(32, 1), Array(33, 1),
Array(34, 1), Array(35, 1), Array(36, 2), Array(37, 1), Array(38, 1),
Array(39, 1), Array(40, 1), Array(41, 1), Array(42, 1), Array(43, 1),
Array(44, 2), Array(45, 2), Array(46, 2)))
The problem vb.2003 don't know the constants Array, xlDelimited, I want to
know wich refrence a need to add.
The project has this reference
Imports Microsoft.Office.Interop.Excel
and this objects
Dim oWs As New Microsoft.Office.Interop.Excel.Worksheet
Dim oWb As Microsoft.Office.Interop.Excel.Workbook
Dim oExcelApp As New Microsoft.Office.Interop.Excel.Application
Dim sNewXlsFile As String
Dim sXlsTemplate As String
Dim wversion As String
sNewXlsFile = txtFile.Text
sXlsTemplate = txtFile.Text
oExcelApp = CreateObject("EXCEL.APPLICATION")
oExcelApp.Visible = False
oExcelApp.Workbooks.Add()
oWs = oExcelApp.ActiveSheet
oWb = oExcelApp.ActiveWorkbook
Can somebody help me ?
using Office 2003. I development a new aplicacion with vb.2003 but I have a
problem in this section
oExcelApp.Workbooks.OpenText(FileName:=Warchivotxt, Origin:=437,
StartRow:=1, DataType:=xlDelimited, TextQualifier:=xlDoubleQuote,
ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=False, Comma:=False,
Space:=False, Other:=False, FieldInfo:=Array(Array(1, 3), Array(2, 3),
Array(3, 1), Array(4, 3), Array(5, 3), Array(6, 1), Array(7, 3), Array(8, 2),
Array(9, 2), Array(10, 2), Array(11, 2), Array(12, 2), Array(13, 2),
Array(14, 2), Array(15, 2), Array(16, 2), Array(17, 2), Array(18, 1),
Array(19, 1), Array(20, 2), Array(21, 2), Array(22, 2), Array(23, 2),
Array(24, 2), Array(25, 1), Array(26, 2), Array(27, 1), Array(28, 1),
Array(29, 1), Array(30, 1), Array(31, 1), Array(32, 1), Array(33, 1),
Array(34, 1), Array(35, 1), Array(36, 2), Array(37, 1), Array(38, 1),
Array(39, 1), Array(40, 1), Array(41, 1), Array(42, 1), Array(43, 1),
Array(44, 2), Array(45, 2), Array(46, 2)))
The problem vb.2003 don't know the constants Array, xlDelimited, I want to
know wich refrence a need to add.
The project has this reference
Imports Microsoft.Office.Interop.Excel
and this objects
Dim oWs As New Microsoft.Office.Interop.Excel.Worksheet
Dim oWb As Microsoft.Office.Interop.Excel.Workbook
Dim oExcelApp As New Microsoft.Office.Interop.Excel.Application
Dim sNewXlsFile As String
Dim sXlsTemplate As String
Dim wversion As String
sNewXlsFile = txtFile.Text
sXlsTemplate = txtFile.Text
oExcelApp = CreateObject("EXCEL.APPLICATION")
oExcelApp.Visible = False
oExcelApp.Workbooks.Add()
oWs = oExcelApp.ActiveSheet
oWb = oExcelApp.ActiveWorkbook
Can somebody help me ?