Use Aspose.Excel in an aspx with no need for .cs-files


#1

Hi, I’ve just downloaded a demo of Aspose.Excel and I wonder: isn’t it possible to write a complete aspx-file in for example Notepad or Frontpage (with no need for .cs-files) and in that file use Aspose.Excel? If so, are there any examples?

Cheers

Jan


#2

Dear Jan,

Yes Aspose.Excel can be used in an Aspx page without .cs file. This is an example in Visual Basic and C#.

[Visual Basic]

<%@ Import Namespace=“Aspose.Excel” %>
<%@ Import Namespace=“System.Data” %>











[C#]

<%@ Import Namespace=“Aspose.Excel” %>
<%@ Import Namespace=“System.Data” %>









Please check the following articles for more info.

Working With Business Objects.

Using Components in ASP.NET, Part 2 .


#3

Thanks, the C#-part works properly, but not the VB part. If I change <script language=“C#”… to <script language=“VB”… and remove “{” it’s better, but still not working because of “typeof”. This can be changed, but it seems as excel.Save (or something else) doesn’t work (there is no excel-file, instead the result is showed). Could I get another hint…
Thanks
Jan


#4

Dear Jan,

Thanks for your correction of the Visual Basic code since it’s simply converted from the C# code by using ConvertCSharp2VB. Sorry for not being fully tested.

You should have seen the contents included in the sheet1 if you scroll down the scrollbar both vertically and horizontally.

Happy with Aspose.Excel!