I have a form from where user want to connect to a DB and fill a spread sheet (excel). This is supported in vb.net. Below syntax gives me error in asp. Below is my code. Thanks.

Dim xlApp As Excel.Application = New Excel.ApplicationClass
Dim xlBook As Excel.Workbook
Dim xlSheet1 As Excel.Worksheet = CType(xlBook.Worksheets(1), Excel.Worksheet)

Well provide the error message and we may be able to provide a solution. :?:

"Remember we are not working on what you are working on. So when you ask for help you should be concise, but explicit about what it is you are trying to do, the code you are trying to accomplish it with, and the error(s) you are getting."

:cool:

I have a form from where user want to connect to a DB and fill a spread sheet (excel). This is supported in vb.net. Below syntax gives me error in asp. Below is my code. Thanks.

Dim xlApp As Excel.Application = New Excel.ApplicationClass
Dim xlBook As Excel.Workbook
Dim xlSheet1 As Excel.Worksheet = CType(xlBook.Worksheets(1), Excel.Worksheet)

You say it is supported in VB.net. But is it supported in ASP.net Web Applications?

There is a difference.

I looked around the web and in my manuals, and found nor references to using an Excel component or spreadsheets in ASP.net.

Would be a cool project to make one though.

Well it should be useable in ASP.Net...


Ok, well either tonight or tomorrow I will try to do up a tutorial on this.

No promises....

Why do what is already done!

Here is a link. MSDN is your friend.

:cool:

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.