Unable to set the Excelio License key in Angular 17

Posted by: Kevin.Happe on 10 February 2025, 12:34 pm EST

    • Post Options:
    • Link

    Posted 10 February 2025, 12:34 pm EST

    We are unable to get the ExcelIO license to work with Angular 17

    We tried using the

    (ExcelIO as any)lLicenseKey = ‘key’

    (ExcelIO)lLicenseKey = ‘key’

    And neither one of those worked. They wouldnt compile.

    We found an article recommending the updateExcelIOLicenseKey (obj, license) method approach.

    See below.

    That compiled, but we still get the Excel IO license not found when we export a file.

    Any suggestions?

    function updateExcelIOLicenseKey(obj, license) {

    obj.LicenseKey = license;

    }

    function initializeLicenses(): Promise {

    GC.Spread.Sheets.LicenseKey = ‘actualkey’;

    updateExcelIOLicenseKey(ExcelIO, ‘actualkey’);

    // spreadExcel.LicenseKey = ‘actualkey’;

    // (ExcelIO as any).LicenseKey = ‘actualkey’;

    // (ExcelIO).LicenseKey = ‘actualkey’;

    }

  • Posted 11 February 2025, 3:02 am EST

    Hi,

    We can replicate the issue you mentioned on our end. This is because of the differences between the handling of the ExcelIO in different versions of Angular is different. However, this issue can be resolved by mounting the GC on a global object so that excelIO will get the license through the global GC. The same is recommended in the SpreadJS Angular ExcelIO Documentation : https://developer.mescius.com/spreadjs/docs/javascript-frameworks/angular/angular-excelio.

    You can refer to the attached sample that works as expected by mounting the GC to a global object (see below).

    Please feel free to reach out if you encounter any further issues or require additional guidance.

    Attachment: (ExcelIO License) https://jscodemine.mescius.io/sample/0NP69ALlFEe4HEEeerQpgA/

    Best Regards,

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels