Freeze panes in excel report.

Stimulsoft Reports.NET discussion
Post Reply
vella
Posts: 5
Joined: Fri Aug 31, 2012 4:09 pm

Freeze panes in excel report.

Post by vella »

Hello,
is it possible to freeze panes in excel report?
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Freeze panes in excel report.

Post by HighAley »

Hello.

Yes, you could do it in the Excel2007 and ExcelXml exports.
At first you should set on of the next properties or both:

Code: Select all

StiOptions.Export.Excel2007.AllowFreezePanes = true;
StiOptions.Export.ExcelXml.AllowFreezePanes = true;
Then you should choose the component which bottom left conner will be frozen and set one of next properties:
  • The Lock property should be set to True.
  • The Tag property should be set to excelfreezepanes.
Thank you.
vella
Posts: 5
Joined: Fri Aug 31, 2012 4:09 pm

Re: Freeze panes in excel report.

Post by vella »

Hello,
I tried to do all this things for my excel report header, but it didn't work for me. What's wrong in my mrt?
Thank you.
Attachments
Report.mrt
(15.55 KiB) Downloaded 536 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Freeze panes in excel report.

Post by HighAley »

Hello.

Did you set the AllowFreezePanes static option?
It's not necessary to do both. You could either set Lock property or set Tag value.
You could set it in the Begin Render event of the report.

Thank you.
vella
Posts: 5
Joined: Fri Aug 31, 2012 4:09 pm

Re: Freeze panes in excel report.

Post by vella »

Hello,
I set this option, but it didn't help.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Freeze panes in excel report.

Post by HighAley »

Hello.

Could you specify the assembly's version and what component do you use?
How did you set next options?

Code: Select all

StiOptions.Export.Excel2007.AllowFreezePanes = true;
StiOptions.Export.ExcelXml.AllowFreezePanes = true;
Thank you.
vella
Posts: 5
Joined: Fri Aug 31, 2012 4:09 pm

Re: Freeze panes in excel report.

Post by vella »

Hello,
version 2012.1.1300.0.

Code: Select all

 StiOptions.Export.Excel.ShowGridLines = false;
 StiOptions.Export.Excel2007.AllowFreezePanes = true;
 StiOptions.Export.ExcelXml.AllowFreezePanes = true;
 var exportExcel = new StiExcelExportService();
 exportExcel.ExportExcel(report, outStream);
Thank you.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Freeze panes in excel report.

Post by HighAley »

Hello.

You are exporting in the format that don't support freezing of cells.
AS we wrote before:
Aleksey Andreyanov wrote:Yes, you could do it in the Excel2007 and ExcelXml exports.
You should to use Stimulsoft.Report.Export.StiExcel2007ExportService.

Thank you.
Post Reply