Text2Excel


#1

Hi,

I am interested in your excel product, I understand it is a .net component? I
have text files I would like to convert to excel format, how might this be
accomplished with your product. Do you have any parsing routines written. If
I were to generate an array from my text file how easy would it be to
convert to your excel object model. Does your product work with Winforms and
utilize vb.net?

Thanks,

Bob


#2

Dear Bob,

Thanks for your consideration. Yes, Aspose.Excel is a pure .net component. And it can work with Winforms and VB. Please download our demo and you will find the VB sample code.

If you want to convert your text file to excel, you have to parse it by own code since we don’t know the format and content of your file. You can use Cell.PutValue to put a single value or Cells.ImportDataTable to import data from a datatable. Please refer to the api reference.

If you generate an array from your text file, you can simply put it into cell object.
For example,

Dim stringArray() As String = New String(3) {}
stringArray(0) = "string1"
stringArray(1) = "string2"
stringArray(2) = “string3”

Dim excel As Excel = New Excel()

Dim cells As Cells = excel.Worksheet(0).Cells

Dim i As Integer
For i = 0 To 2
cells(0,i).PutValue(stringArray(i))
Next

And you give me a good suggestion, I will add a new method Cells.ImportArray to directly import your data. It will be availabe within this week.


#3

Hi Lawrence,
Got this error after I established virtual directory in IIS
Please advise.

Thanks,
Bob

Server Error in ‘/Aspose.Excel.Demos.VisualBasic’ Application.
--------------------------------------------------------------------------------

Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not load type ‘Aspose.Excel.Demos.VisualBasic.Global’.

Source Error:


Line 1: <%@ Application Codebehind=“Global.asax.vb” Inherits=“Aspose.Excel.Demos.VisualBasic.Global” %>



Source File: C:\Program Files\Aspose\Aspose.Excel\Demos\Aspose.Excel.Demos.VisualBasic\global.asax Line: 1


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573


#4

Dear Bob,

Please refer to feature demo installation guide.