Hi,
I am exporrting igHierarchicalGrid but getting error infragistics.excel.js:88 Uncaught TypeError: $$t.$fw.getBox is not a function(…)
I am loading file in this order
<script src="/plugins/infragistics/js/infragistics.loader.js"></script><script src="/plugins/infragistics/js/infragistics.core.js"></script><script src="/plugins/infragistics/js/infragistics.dv.js"></script><script src="/plugins/infragistics/js/infragistics.lob.js"></script><script src="/plugins/infragistics/js/infragistics.gridexcelexporter.js"></script><script src="/plugins/infragistics/js/infragistics.excel.js"></script><script src="/plugins/infragistics/js/FileSaver.js"></script><script src="/plugins/infragistics/js/Blob.js"></script>
If I don't include infragistics.excel.js I get following error infragistics.gridexcelexporter.js:23 Uncaught TypeError: Cannot read property 'Workbook' of undefined(…)
This happens for igGrid Export as well.
I am calling Ecport grid as follows
$("#exportButton").on("onclick", function () { $.ig.GridExcelExporter.exportGrid($("#Grid"), { fileName: "igGrid", worksheetName: "Sheet1", tableStyle: "tableStyleLight13", dataExportMode: "allRows" }); });
Please help.
Hello Hristo,
I changed the references as suggessted, but I am still getting error.
We are loading all the references and I get that error before clicking the button for Export. (getting error right after loading everything)
I am using Version: Infragistics Professional 2016 VOL 1
Thank you for the code snippets provided. The code itself is fine and what seems to be causing issues is the way the resources are referenced.
The infragistics.core.js and infragistics.lob.js contain all code needed for most IgniteUI components to work, except data visualization components like the charts, which require the infragistics.dv.js resource to be loaded. At the same time you are referencing also the igLoader, that loads only the required resources on demand. This is valid for all scenarios, while for using the igGridExcelExporter also the infragistics.documents.core.js and infragistics.excel.js should be loaded before the infragistics.gridexcelexporter.js.
Considering the above there are two ways to configure the references right:
1) Load all resources:
<script src="/plugins/infragistics/js/FileSaver.js"></script><script src="/plugins/infragistics/js/Blob.js"></script>
<script src="/plugins/infragistics/js/infragistics.core.js"></script><script src="/plugins/infragistics/js/infragistics.dv.js"></script><script src="/plugins/infragistics/js/infragistics.lob.js"></script>
<script src="/plugins/infragistics/js/modules/infragistics.documents.core.js"></script><script src="/plugins/infragistics/js/modulesinfragistics.excel.js"></script><script src="/plugins/infragistics/js/infragistics.gridexcelexporter.js"></script>
2) Use igLoader to load only required resources:
<script src="http://www.igniteui.com/js/external/FileSaver.js"></script> <script src="http://www.igniteui.com/js/external/Blob.js"></script>
<!-- Ignite UI Loader Script --> <script src="="/plugins/infragistics/js/infragistics.loader.js"></script>
<script> $.ig.loader({ scriptPath: "="="/plugins/infragistics/js/", cssPath: "="="/plugins/infragistics/css/", resources:'igGrid.*,' + 'modules/infragistics.documents.core.js,' + 'modules/infragistics.excel.js,' + 'modules/infragistics.gridexcelexporter.js' });
$.ig.loader(function () { ... // your code }); </script>
Please refer to igLoader API documentation for more information on loading resources.