VB.Net IDE Doesn't support Aspose.Excel same as c#?

I am new to aspose.excel. I am having some queries and hoping to get some solutions.

1. I am trying to open a xls file from my vb.net ide. and my code like…

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim myExcel As New Aspose.Excel.Excel
Dim cell1 = myExcel.Worksheets(0).Cells(“A1”)

myExcel.Open(“C:\Test.xls”)
cell1.PutValue(“Hello world”)
myExcel.Save(“C:\Test.xls”)
End Sub

when I am checking I am able to see Hello world in A1 cell. But when I am selecting cell1and looking for intelligsence of IDE its only giving me gettype and none of the other options. I tried with c# and I am able to see lot of methods like putvalue etc.

2. I would like to see test.xls on my screen from IDE which helps me to see time to time how things are copying into the worksheets.

3. I am trying to write abvoe code in a class.vb. But some syntax is not working and no intellisense for vb.net IDE.

Am I doing anything wrong?
Appreciated for any help for these 3 queries.
Thanks heaps in advance.

About your questions:

1, 3: I created a similar project with same code as yours and all works fine. That may be a problem in you VB.Net IDE. Please check the settings.
If you cannot find any clues, could you please zip your project and post it here? I will check it.

2. You can only use MS Excel to view the excel file. And you can try to use the following code to open it after creating the file:

Dim myExcel As New Aspose.Excel.Excel
Dim cell1 = myExcel.Worksheets(0).Cells(“A1”)

myExcel.Open(“C:\Test.xls”)
cell1.PutValue(“Hello world”)
myExcel.Save(“C:\Test.xls”)

Process.Start(“C:\Test.xls”)

Hi Laurence,

Prcoess.Start is working great. Thanks. But as i mentioned I am still having intellisense problem in vb.net. I re-installed my VS.NET and still couldn’t figure out the solution for it. I am a new user of Aspose.Excel with vb.net and I am trying to do some practice. I haven’t started my project but sooner going to start and just tried with small code which I posed earlier. Even now also IDE is not giving ‘PutValue’ etc. options while giving Dot(.). I am comfort with VB.net but, to get help from IDE intellisense i am forcing to do in c#.
Is there any way I can overcome this problem?
Appreciated for your help.

Dim myExcel As New Aspose.Excel.Excel
Dim cell1 = myExcel.Worksheets(0).Cells(“A1”)

myExcel.Open(“C:\Test.xls”)
cell1.PutValue(“Hello world”)
myExcel.Save(“C:\Test.xls”)

I found there is a problem in your above code.

Dim cell1 = myExcel.Worksheets(0).Cells(“A1”)

cell1 is an object, not a Cell object.

Please change it to:

Dim cell1 as Cell = myExcel.Worksheets(0).Cells(“A1”)

Thanks for your help and trying for the solution…
I declared same as you given. But when I am giving Dim cell1 as —then no ‘Cell’ option in the dropdown menu(IDE intellisense). Still I tried to given as
Dim cell1 As Cell = myExcel.Worksheets(0).Cells(“A1”)
and there is an error showing at Cell(object). and same no intellisense at all.
Appreciated for any help.

Have you imported Aspose.Excel?

imports Aspose.Excel


Or you can declare it as

Dim cell1 As Aspose.Excel.Cell = myExcel.Worksheets(0).Cells("A1")

Thanks heaps Laurence. Its working great.