Hi support,
I'm wondering if is possible to bind a datasource do your spreadsheet component.We need to create a custom datasource, load it into an excel like spreadsheet and then extract it for the persistence phase.
I'm searching trought tutorial but it seems that Ignite UI spreadsheet talk only via excel files.Is it correct?Thanks in advance,Tiziano.
Hello Tiziano,
The igx-spreadsheet control in the Infragistics Ignite UI for Angular toolset cannot take a traditional “array” data source – it takes a Workbook object to display. With that said, you do not actually need to load an Excel file for this, you can create a Workbook object and assign it to the igx-spreadsheet. The structure of a Workbook is much like a data table, in that you can add a Worksheet to the Sheets collection of the Workbook and then populate the Rows (WorksheetRow) and Cells of those rows (WorksheetCell) elements like you would in a data table.
For more information on setting up a Workbook, see our documentation about the Excel Library, here.
Please let me know if you have any other questions or concerns on this matter.
Hi Andrew,
The 'ExcelUtility' class used in:
import { Workbook } from "igniteui-angular-excel/ES5/Workbook"; import { WorkbookSaveOptions } from "igniteui-angular-excel/ES5/WorkbookSaveOptions"; import { WorkbookFormat } from "igniteui-angular-excel/ES5/WorkbookFormat"; import { ExcelUtility } from "excel_utility_location"; var workbook = ExcelUtility.load(file); ExcelUtility.save(workbook, "fileName");
gives 404 on your samples page on github.
Do you know any valid alternative that works with igSpreadsheet?
Unfortunately, it does appear that the ExcelUtility class was moved (or *removed*) from the IgniteUI Angular Samples GitHub repository. As such, I am attaching the ExcelUtility file that you need to include here.
Note, there is an additional requirement in this case in that you need to include/install the file-saver and @types/file-saver npm packages in order to utilize this file.
I will be looking into the broken link in our documentation as to correct it and route it to the correct spot.
I hope this helps you. Please let me know if you have any other questions or concerns on this matter.
excel-utility.zip