jQuery UI Widgets Forums Angular Error exporting to XLSX

Tagged: ,

This topic contains 1 reply, has 2 voices, and was last updated by  Yavor Dashev 3 years, 9 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Error exporting to XLSX #114384

    poiuy
    Participant

    Good morning.
    I am having an error with JqxGrid in Angular, when I export the table to XLSX I get this error “Error: Object doesn’t support this action”.

    I have looked at your example and you have the same problem:
    example
    Any solution?, greetings.

    Error exporting to XLSX #114388

    Yavor Dashev
    Participant

    Hi poiuy,

    I have managed to recreate the situation in the demo you have shared and you need to make sure that you have included the scripts for the data exporting in your index.html file I have tested locally your situation and adding those scripts fixes this problem.For example take a look a this demo
    https://www.jqwidgets.com/angular/angular-grid/#https://www.jqwidgets.com/angular/angular-grid/angular-grid-dataexportview.htm

    Or in this code snippet in which I used the code from the example you shared
    //In your HTML file

    <body>
      <app-root></app-root>
    <!-- Scripts you need to add -->
    <script src="runtime-es2015.js" type="module"></script><script src="polyfills-es2015.js" type="module"></script><script src="runtime-es5.js" nomodule></script><script src="polyfills-es5.js" nomodule></script><script src="main-es2015.js" type="module"></script><script src="main-es5.js" nomodule></script>
    		<script>
    		window.onload = function() {
    			const script = document.createElement('script');
    		
    			script.type = "text/javascript";
    			script.src="https://www.jqwidgets.com/jquery-widgets-demo/jqwidgets/jqxexport.js"; 
    		
    			document.body.appendChild(script);
    		}
    		</script>
    		<!-- JSZip -->
    		<script type="text/javascript" src="https://www.jqwidgets.com/jquery-widgets-demo/scripts/jszip.min.js"></script>
    		<!-- pdfmake -->
    		<script src="runtime-es2015.js" type="module"></script><script src="polyfills-es2015.js" type="module"></script><script src="runtime-es5.js" nomodule></script><script src="polyfills-es5.js" nomodule></script><script src="main-es2015.js" type="module"></script><script src="main-es5.js" nomodule></script>
    		<script>
    		window.onload = function() {
    			const script = document.createElement('script');
    		
    			script.type = "text/javascript";
    			script.src="https://www.jqwidgets.com/jquery-widgets-demo/jqwidgets/jqxexport.js"; 
    		
    			document.body.appendChild(script);
    		}
    		</script>
    		<!-- JSZip -->
    		<script type="text/javascript" src="https://www.jqwidgets.com/jquery-widgets-demo/scripts/jszip.min.js"></script>
    		<!-- pdfmake -->
    		<script type="text/javascript" src="https://www.jqwidgets.com/jquery-widgets-demo/scripts/pdfmake.min.js"></script>
    		<script type="text/javascript" src="https://www.jqwidgets.com/jquery-widgets-demo/scripts/vfs_fonts.js"></script>
    </body>

    Best Regards,
    Yavor Dashev
    jQWidgets team
    https://www.jqwidgets.com

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

You must be logged in to reply to this topic.