How to Registering an EXCEL Data for the Report Template?

Stimulsoft Reports.JS discussion
Post Reply
suntianyong
Posts: 3
Joined: Sun Oct 22, 2023 3:53 am

How to Registering an EXCEL Data for the Report Template?

Post by suntianyong »

How to Registering an EXCEL Data for the Report Template?
Max Shamanov
Posts: 792
Joined: Tue Sep 07, 2021 10:11 am

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

Post 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.
suntianyong
Posts: 3
Joined: Sun Oct 22, 2023 3:53 am

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

Post by suntianyong »

how t to use javascript code registering an excel data Sources for the Report Template?
Max Shamanov
Posts: 792
Joined: Tue Sep 07, 2021 10:11 am

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

Post 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.
Post Reply