Skip to content

Infragistics Community Forum / Web / Ultimate UI for ASP.NET Web Forms / Error Opening Excel files when using PanesAreFrozen

Error Opening Excel files when using PanesAreFrozen

New Discussion
Darren
Darren asked on Jan 24, 2010 1:09 AM

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.

Sign In to post a reply

Replies

  • 0
    vasantha
    vasantha answered on Dec 21, 2009 11:39 AM

    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.

    • 0
      Mike Dour
      Mike Dour answered on Dec 21, 2009 5:09 PM

      This sounds like it may be a bug with the Excel library. I have forwarded this post to the Developer Support Manager and a DS engineer will be contacting you about this issue.

      • 0
        Alex
        Alex answered on Jan 24, 2010 1:09 AM

        Today I read data in my xls files and after closed MS Excel.But when I opened this file again it was damaged.Fortunately a friend advised me-Excel file error: data may have been lost.Application helped me very fast and absolutely free.I knew how it save important information,such as graphics,statistic and mathematics.

         

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Darren
Favorites
0
Replies
3
Created On
Jan 24, 2010
Last Post
16 years, 1 month ago

Suggested Discussions

Created by

Created on

Jan 24, 2010 1:09 AM

Last activity on

Feb 12, 2026 9:02 AM