This is a migrated thread and some comments may be shown as answers.

Can't freeze pane on hidden spreadsheet

2 Answers 23 Views
Spreadsheet
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 1
Steve asked on 26 Apr 2019, 07:06 AM
I have a sreadsheet I created to do an export to Excel, but it isn't visible, so the ActiveWorksheetEditor never gets created so I can't freeze panes. Is there any way around this?

2 Answers, 1 is accepted

Sort by
0
Accepted
Boby
Telerik team
answered on 30 Apr 2019, 12:21 PM
Hi Steve,

Indeed ActiveWorksheet will be initialized when there are UI editor editing a specific worksheet. Instead, you can directly use the API of the WorksheetViewState for the worksheet that you get by index or by other means, for example:
Workbook workbook = new Workbook();
var worksheet = workbook.Worksheets.Add();
worksheet.ViewState.FreezePanes(1, 0);
 
// or
 
workbook.Worksheets[0].ViewState.FreezePanes(1, 0);

Let us know if you need additional information.

Regards,
Boby
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Edward
Top achievements
Rank 1
Veteran
Iron
answered on 29 Dec 2020, 07:53 AM

To fix Excel freeze pane not working issue you can try the following fixes:

1# Change Page Layout View
2# Unprotect Worksheet
3# Unfreeze Worksheet Pane
4 # Use Table Instead Of Freeze Top Row

 

Tags
Spreadsheet
Asked by
Steve
Top achievements
Rank 1
Answers by
Boby
Telerik team
Edward
Top achievements
Rank 1
Veteran
Iron
Share this question
or