JavaScript UI Libraries & Blazor Components Suite – Smart UI › Forums › General Discussions › Error on XLSX export
- This topic has 4 replies, 2 voices, and was last updated 4 years ago by
deancama.
-
AuthorPosts
-
April 13, 2021 at 7:25 pm #101696
deancama
MemberI 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)April 14, 2021 at 5:17 am #101697admin
KeymasterHi 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/April 14, 2021 at 11:37 am #101699deancama
MemberHi 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 CamaApril 14, 2021 at 2:37 pm #101702admin
KeymasterHi 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/April 14, 2021 at 6:23 pm #101708deancama
MemberHi Peter,
That worked successfully.
Thanks and Regards,
Dean Cama -
AuthorPosts
- You must be logged in to reply to this topic.