Uploading Data from an Excel File

liam

Member
Joined
Jun 8, 2004
Messages
23
Programming Experience
Beginner
I'm developing a software for an insurance broker. They have existing excel files and they required me to upload excel files into the software i'm developing. Is that possible? If so, can anyone guide me into this... Thanks in advance.
 
Excel uploaded to .NET

Indeed you can upload all the contents of an Excel workbook into a .NET application by using the Excel Object Model. I suggest you to look at the Chapter 10 "Automating Microsoft Office Applications" of the well known book "Mastering VB.NET".

There you'll find all the information you need. It was very useful for me too!
 
Uploading Data from an Excel File - FieldInfo is Vanilla


Dim mNumberOfExcelColumns as integer
'Assign the number of tab delimeted columns in the text file, say
mNumberOfExcelColumns = 20

Dim ColumnArray(mNumberOfExcelColumns, 1) As Integer
Dim x As Integer

' Create a For-Next that populates the two dimensions of

' the ColumnArray array.

For x = 0 To mNumberOfExcelColumns

ColumnArray(x, 0) = x

ColumnArray(x, 1) = 2

Next x

xlBooks.OpenText(Filename:=mTempFileNameForExcel, Origin:= _

XlPlatform.xlWindows, StartRow:=1, DataType:=XlTextParsingType.xlDelimited, TextQualifier:= _

XlTextQualifier.xlTextQualifierDoubleQuote, ConsecutiveDelimiter:=
False, Tab:=True, Semicolon:=False, _

Comma:=
False, Space:=False, Other:=False, FieldInfo:=ColumnArray, TrailingMinusNumbers:=True)

 
Back
Top