Free Support Forum - aspose.com

Excel File Error

I receive a "File error: Some data may have been lost" alert when opening a new Excel doc created with Aspose.Cells.

Any suggestions for solving this problem?

I am using Excel 2003 and Aspose.Cells 3.7.1.

Thanks.

Hi,

Could you post your template file? We will check it soon.

Or you can try the new version.

I am not using a template. I am creating a new Excel document from scratch, and filling it with data.

I downloaded and installed the latest version. Same problem.

Thanks.

Hi,

Could you post a sample project? It will help us find the problem.

Problem sovled:

I was calling FreezePanes improperly, with Column specified as 1, but Freezed columns specified as 0.

After changing Column to 0, the error went away.

Thanks.

Hi,

If you want to horizontal freeze Panes, please use FreezePanes(rowIndex,0,rowNumber,0);

If both the row index and column index are not zero, we will think you want split the worksheet to 4 pane. We will look into this issue.

Hi,

Please try this fix.

In this fix,We use Cell.GetStyle and SetStyle method replace the property of Cell.Style.

If you want to set style of the cell, please change your codes as :

//Getting the style of the cell.

Style style = cell.GetStyle();

//Setting the property of the style.

.......

//Setting the style of the cell

cell.SetStyle(style);