Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
85
Error Opening Excel files when using PanesAreFrozen
posted

 Hello All

 

I am using Infragisitcs 7.3, and I am creating an excel workbook using the Infragistics.Excel library.

 

My machine is uisng Office 2003 with SP3 installed.

 

I have code that is manualyl creating an excel workbook, but I am having problems trying to set freeze panes.

 

I am using the following lines of code

            Workbook workbook = new Workbook();
            Worksheet CurrentWorksheet = workbook.Worksheets.Add("Policy ");

// code snip of populating the workbook

            CurrentWorksheet.DisplayOptions.PanesAreFrozen = true;
            CurrentWorksheet.DisplayOptions.FrozenPaneSettings.FrozenRows = 12;


With the above two lines of codes, every time I open an excel worksheet, I always get a dialog from Excel saying

"file error: data may have been lost", then the file opens, and all the data does seem to be present. The panes are frozen in the correct place.

Has anybody else come across this Excel error when trying to open a workbook that has the panes frozen, thye get the above warning?I have also tested this opening file using Excel 2003,with no service packs installed, and SP2. 

Thanks in advance for any help hints. 

Parents
No Data
Reply
  • 20
    posted
    Even i am facing the similar issue. i need to freeze the header pane of an excel exported from ultrawebgrid.here is my code Infragistics.Excel.Workbook StandardModule = new Infragistics.Excel.Workbook(); StandardModule.Worksheets.Add("Module"); StandardModule.Worksheets["StandardModule"].DisplayOptions.PanesAreFrozen = true; StandardModule.Worksheets["StandardModule"].DisplayOptions.FrozenPaneSettings.FrozenRows = 1; this.uwgSearchGridExporter.Export(this.uwgExportToExcel, StandardModule.Worksheets["Module"]); when i open the excel, i am getting "File error : data may have been lost", bt the file opens and the header pane is frozen. i am having Excel 2007 in my machine.
Children