FastReport.Net. Export to xls

4.8k views Asked by At

Below is the code that exports report to xml:

using (FastReport.Export.Xml.XMLExport export = new FastReport.Export.Xml.XMLExport())
{
    if (export.ShowDialog())
        export.Export(report1, @"result.xml");
}

but how to export report to xls-file?

2

There are 2 answers

3
Saikat Hasan Khan On

I don't think FastReport.Net can export to .xls file. But it can export to .xlsx files. Try the following code:

using (var export = new FastReport.Export.OoXML.Excel2007Export())
{
    if (export.ShowDialog())
        export.Export(report1, @"result.xlsx");
}
0
Aleksey Mandrykin On

Export to Excel97-2003 (aka BIFF8, aka xls) has been added in January. Check out latest daily build.

using (var export = new FastReport.Export.BIFF8.Excel2003Export())
{
    if (export.ShowDialog())
        export.Export(report1, @"result.xls");
}