Free Support Forum - aspose.com

Enterprise license problem

I have an Enterprise license. However, I’m getting the following error:



Pivot table/chart in designer file is not supported in this edition.
Unfortunately, this feature is only available in Enterprise Edition, but your
license is for Professional Edition. Please contact Aspose to upgrade your
license.”



I’m trying to follow the pivot table example which is in the
Aspose.Excel reference section and I’m getting the error on the
following statement:



pivotXL.Open(Template, FileFormatType.Default)



Please advise.



(Aspose.Excel version 3.5.2.6)

Could you please post your template file here? I will check it ASAP.

Template file attached.



I’m planning on providing users with a “blank” pivot table, ready for them to drop in the columns / rows they require.

It's odd for I can open it successfully. Please try this attached fix.

If the problem still occurs, please send your license file to nanjing@aspose.com. I will check it.

:frowning:



Nope - no joy I’m afraid. Still get the same error even with the new Aspose.Excel version.

I’ve emailed you my license file.



Thanks.

It's really very odd. I tried the following sample code with your license file and template file and it worked fine.

Aspose.Excel.License lic = new License();
lic.SetLicense("d:\\aspose.custom.lic");
Excel excel = new Excel();
excel.Open("d:\\test\\pivot table 1.xls", FileFormatType.Default);
excel.Save("d:\\test\\abc.xls");

Could you please try to run it in your machine? And please verify that it's v3.5.3.3 in your project.

Ok, I seem to have found something, although I don’t konw why it’s happening…



When I run this code, it works:



Dim pivotXL As New Excel

Dim lic As New Aspose.Excel.License

lic.SetLicense(“c:\temp\aspose.custom.lic”)

pivotXL.Open(Template, FileFormatType.Default)



However, when I run this code, it doesn’t work and I get the error from above:



Dim pivotXL As New Excel

SetLicense()

pivotXL.Open(Template, FileFormatType.Default)



Where SetLicense is as follows:



Private Shared Sub SetLicense()

Dim lcns As License

lcns = New License

lcns.SetLicense(“Aspose.Custom.lic”)

End Sub



I have so far included the license file as an embedded resource,
and I have confirmed that it is the correct license file in my project.



Any ideas?

What happens if you change your code to:

Private Shared Sub SetLicense()
Dim lcns As Aspose.Excel.License
lcns = New License
lcns.SetLicense("Aspose.Custom.lic")
End Sub

Unfortunately I get the same error:



Pivot table/chart in designer file is not supported in this edition.
Unfortunately, this feature is only available in Enterprise Edition, but your
license is for Professional Edition. Please contact Aspose to upgrade your
license




I did originally start off using a Professional license, until I
upgraded to Enterprise recently. I use the SetLicense sub because I
have several routines that will create Excel reports and they can all
call the same license sub. A license is definitely being picked up
though because I don’t get any garbage text or extrat worksheets in my
reports.



btw. When exectly should the license be set - every time I create a new Aspose.Excel instance?

I think this problem is caused by that your program still set the old license file.

Because you don't explicitly specify the path of license file, we will find it in the following places:

  1. Explicit path.
  2. The folder that contains Aspose.Excel.dll.
  3. The folder that contains the assembly that called Aspose.Excel.dll.
  4. The folder that contains the entry assembly (your .exe).
  5. An embedded resource in the assembly that called Aspose.Excel.dll.

So your program may find the old license file.

Please remove all your old license file in your dev machine.

And you just need to call SetLicense method once in your program.

Yep - my old license file was in my app’s bin folder! As soon as that was removed it worked.



Thanks again for your excellent help!!