Get License From Stream


I added the license file to a project (at the root level) and am trying to load the license file using a stream. When I open the resulting spreadsheet, the license file failed to load indicated by bad data in some of the fields.

Why doesn't this work?:

License license = new License();
Assembly assembly = Assembly.GetExecutingAssembly();
Stream licenseStream = assembly.GetManifestResourceStream("Aspose.Excel.lic");



Hi Aaron,

If you add license file to a project, please right click it and choose build action to "Embedded Resource" in properties window. Then you can use the follow code:

License license = new License();

Please check for more information.