Page 1 of 1

How to Registering an EXCEL Data for the Report Template?

Posted: Tue Oct 31, 2023 12:04 pm
by suntianyong
How to Registering an EXCEL Data for the Report Template?

Re: How to Registering an EXCEL Data for the Report Template?

Posted: Tue Oct 31, 2023 1:47 pm
by Max Shamanov
Hello,

Please check the following link.
How to create datasource based on Excel data.
https://www.stimulsoft.com/en/documenta ... g_data.htm

Thank you.

Re: How to Registering an EXCEL Data for the Report Template?

Posted: Wed Nov 01, 2023 11:41 am
by suntianyong
how t to use javascript code registering an excel data Sources for the Report Template?

Re: How to Registering an EXCEL Data for the Report Template?

Posted: Thu Nov 02, 2023 11:20 am
by Max Shamanov
Hello,

You can use the following code:

Code: Select all

report.dictionary.databases.add(new Stimulsoft.Report.Dictionary.StiExcelDatabase("excel", "/TestApp/Data/Book1.xlsx"));
            var table = new Stimulsoft.Report.Dictionary.StiDataTableSource("excel.Sheet1", "table1");
            var column1 = new Stimulsoft.Report.Dictionary.StiDataColumn("Id", "Id", "Id", String)
            table.columns.add(column1);
            report.dictionary.dataSources.add(table);
Thank you.