Applying Licence to Reports


#1

I’m setting the Aspose Excel object as follows:

xls = New Aspose.Excel.Excel(GlobalConstants.APP_AsposeLicenceFile) where GlobalConstants.APP_AsposeLicenceFile is returning a mapped path to the file on the server but get the following error on that line:

Source : mscorlib
Procedure:Invalid character in a Base-64 string.

Any ideas?


#2


Dear Andrew,

You need to use Excel Constructor (String, Page) to create a new Excel instance as Aspose.Excel is used in your web form app.

Instead, Excel Constructor (String) is used in a Windows forms app.

So th code to license your copy of Aspose.Excel should like this:


In C#:

string licenseFile = MapPath(“License”) + “\Aspose.Excel.lic”;

Excel excel = new Excel(licenseFile, this);

In Visual Basic .Net:

Dim licenseFile As String = MapPath(“License”) + “\Aspose.Excel.lic”

Dim excel As Excel = New Excel(licenseFile, Me)

Please let me know if you have problems.


#3

Hi Ben

I have tried using the Excel Constructor in the format above but still get the same error.

I’m wondering if the Licence File contains an invaild character?

Cheers

Andrea


#4


Dear Andrea,

As the licensing disucssion may disclose privacy of your organization please check your email.

Thanks for cooperation.