This topic contains 4 replies, has 2 voices, and was last updated by Avatar deancama 5 months, 1 week ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #101696
    Avatar
    deancama
    Participant

    I am using the latest version 9.1.0 of Smart Elements for Angular and I am attempting to use exportData syntax on a grid component. The CSV format works without issue, however when using the exportData(‘xlsx’) command on the same grid component with the same dataset, I am receiving the following error in Chrome dev tools console:

    core.js:6162 ERROR Error: Missing reference to ‘jszip.min.js’.
    at e.value (smart.grid.js:8)
    at e.value (smart.grid.js:8)
    at HTMLElement.value [as exportData] (smart.grid.js:8)
    at GridComponent.exportData (smart-webcomponents-angular-grid.js:995)
    at HTMLElement.<anonymous> (home.component.ts:4223)
    at ZoneDelegate.invokeTask (zone-evergreen.js:399)
    at Object.onInvokeTask (core.js:28497)
    at ZoneDelegate.invokeTask (zone-evergreen.js:398)
    at Zone.runTask (zone-evergreen.js:167)
    at ZoneTask.invokeTask [as invoke] (zone-evergreen.js:480)

    #101697
    Avatar
    admin
    Keymaster

    Hi deancama,

    You need to include the missing reference to ‘jszip.min.js’. The file can be found in the installation package.

    Best regards,
    Peter Stoev

    Smart UI Team
    https://www.htmlelements.com/

    #101699
    Avatar
    deancama
    Participant

    Hi Peter,

    I am relatively new to working with Angular and this library, however, I did installed the Angular licensed package using npm and all other components I’ve been using so far are working without any additional references to external js scripts. Would you be able to please provide or point me to an example because I am not exactly sure as to where or how to include this file reference.

    Thanks and Regards,

    Dean Cama

    #101702
    Avatar
    admin
    Keymaster

    Hi Dean Cama,

    I would suggest you to download the library from our website. The .zip includes the angular examples available on the website.

    For the export, you need to refer to:

       <!-- JSZip -->
    <script type="text/javascript" src="../../scripts/jszip.min.js"></script>
    <!-- pdfmake -->
    <script type="text/javascript" src="../../scripts/pdfmake.min.js"></script>
    <script type="text/javascript" src="../../scripts/vfs_fonts.js"></script>

    In your index page.

    Best regards,
    Peter Stoev

    Smart UI Team
    https://www.htmlelements.com/

    #101708
    Avatar
    deancama
    Participant

    Hi Peter,

    That worked successfully.

    Thanks and Regards,

    Dean Cama

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.