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 Reply Children
No Data