Excel 2003 Worksheet Custom Properties corrupted upon save

Hello,

We are having some problems with the way Aspose.Cells (v7.3.0) handles worksheet Custom Properties at save time.

The attached files:
- test.xls: this is an Excel 2003 workbook containing an worksheet that has Custom Properties generated by a 3rd party Excel Addin.
- test-MsExcel.xlsx: this is the “test.xls” workbook saved to xlsx using Ms Excel 2007. This contains correct Custom Property values.
-
test-Aspose.xlsx: this is the “test.xls” workbook saved to xlsx using Aspose.Cells. The binary values of the Custom Properties have been altered and the 3rd party Addin crashed when tries to read these.

The code used to save to xlsx:
var workbook1 = new Workbook(“test.xls”);

workbook1.Save(“test-Aspose.xlsx”, SaveFormat.Xlsx);

Note: The same issue happens when saving to Excel 2003 format using Aspose.Cells.

Aspose should handle the Custom Property values as black boxes, preserving the exact binary value as in the original workbook.


Thank you,
Bogdan Rusu.
IBM Romania.

Hi,


Thank you for using Aspose.Cells.

We will soon look into your findings, and escalate the issue to our development team for further investigation and resolution.

Hi Adrian,


Can you please tell us which custom properties are corrupted after saving the file using Aspose.Cells? If you can provide names/screenshot of the affected custom properties, it will be more helpful in the investigation of this issue and its resolution. We appreciate your cooperation in this regard.

Hello,

There are two custom properties that get corrupted: “COR_Report” and “COR_ResultSet”.

Regards.
Bogdan Rusu.

ibmromania:
Hello,

There are two custom properties that get corrupted: "COR_Report" and "COR_ResultSet".

Regards.
Bogdan Rusu.
Hi,

I am unable to find any custom property as mentioned by you except there is one property with the name: EBOID.

Please see the screenshot below.

Hello,

I was referring to the Worksheet Custom Properties, these can be found on the worksheet:

            var workbook = new Workbook(“test.xlsx”);
var worksheet = workbook.Worksheets[0];
var customProperties = worksheet.CustomProperties;

Regards,
Bogdan Rusu.

Hi Adrian,


Thank you for the feedback.

I tried to navigate to COR_Report and COR_ResultSet, but couldn’t find these custom properties to check for the issues. Can you please provide some guidance about how to verify these, as I can’t find these using the custom properties object. We appreciate your cooperation in this regard.
ibmromania:
Hello,

I was referring to the Worksheet Custom Properties, these can be found on the worksheet:

            var workbook = new Workbook("test.xlsx");
            var worksheet = workbook.Worksheets[0]; 
            var customProperties = worksheet.CustomProperties;

Regards,
Bogdan Rusu.
Hi,

Thanks for your sample code.

I have tested your mentioned custom properties and found they are equal both in actual and saved file.

I have tested it using the latest version: Aspose.Cells for .NET v7.3.0.1 Please download and use it.

C#
String filePath = @"F:\Shak-Data-RW\Downloads\test.xls";

Workbook workbook = new Workbook(filePath);

var o1 = workbook.Worksheets[0];

workbook.Save(filePath + ".out.xlsx", SaveFormat.Xlsx);

workbook = new Workbook(filePath + ".out.xlsx");
var o2 = workbook.Worksheets[0];

if (o1.CustomProperties["COR_Report"].Value == o2.CustomProperties["COR_Report"].Value)
{
Console.WriteLine("COR_Report is equal in both files.");
}

if (o1.CustomProperties["COR_ResultSet"].Value == o2.CustomProperties["COR_ResultSet"].Value)
{
Console.WriteLine("COR_ResultSet is equal in both files.");
}

Hello,

I’ve verified your code and it works well, but he problem can be observed when comparing the xlsx file created by Aspose (“test-Aspose.xlsx” OR “test.xls.out.xlsx” as in your sample code) and the xlsx file created by Excel 2007 (“test-MsExcel.xlsx”).
I’ve modified your sample code to compare these files:

            // “test-MsExcel.xlsx” is the “test.xls” file saved to xlsx using Excel 2007
var excelWorkbook = new Workbook(@“C:\Users\IBM_ADMIN\desktop\test-MsExcel.xlsx”);
var o1 = excelWorkbook.Worksheets[0];
        <span style="color:#2b91af;">String</span> filePath = <span style="color:#a31515;">@"C:\Users\IBM_ADMIN\desktop\test.xls"</span>;
        <span style="color:#2b91af;">Workbook</span> workbook = <span style="color:blue;">new</span> <span style="color:#2b91af;">Workbook</span>(filePath);
        workbook.Save(filePath + <span style="color:#a31515;">".out.xlsx"</span>, <span style="color:#2b91af;">SaveFormat</span>.Xlsx);
        workbook = <span style="color:blue;">new</span> <span style="color:#2b91af;">Workbook</span>(filePath + <span style="color:#a31515;">".out.xlsx"</span>);
        <span style="color:blue;">var</span> o2 = workbook.Worksheets[0];

        <span style="color:blue;">if</span> (o1.CustomProperties[<span style="color:#a31515;">"COR_Report"</span>].Value == o2.CustomProperties[<span style="color:#a31515;">"COR_Report"</span>].Value)
        {
            <span style="color:#2b91af;">Console</span>.WriteLine(<span style="color:#a31515;">"COR_Report is equal in both files."</span>);
        }

        <span style="color:blue;">if</span> (o1.CustomProperties[<span style="color:#a31515;">"COR_ResultSet"</span>].Value == o2.CustomProperties[<span style="color:#a31515;">"COR_ResultSet"</span>].Value)
        {
            <span style="color:#2b91af;">Console</span>.WriteLine(<span style="color:#a31515;">"COR_ResultSet is equal in both files."</span>);
        }</pre>Running the code you will notice that the values are not the same. As stated in my original post Aspose.Cells should not change the <b>binary</b> values of the existing Custom Properties.<br><br>Thank you,<br>Bogdan Rusu.<br><br><br>

Hi Adrian,


Thank you for the feedback.

I can observe/reproduce the issue of custom properties as you have mentioned in your feedback. We will investigate this issue and update you here once we have any information about its resolution. We appreciate your patience in this regard.

The issue has been logged in our Issue Tracking System as: CELLSNET-40886.

Hi,

Thanks for using Aspose.Cells.

Please download and try this fix: Aspose.Cells for .NET v7.3.0.2 and let us know your feedback.

Hello,

I’ve verified the fixed version by saving to xls/xlsx and works correctly.

Thank you for your quick response,
Bogdan Rusu,
IBM Romania.

Hi,

Thanks for your feedback.

Please feel free to post if you face any other issue relating to Aspose.Cells for .NET, we will be glad to help you.

The issues you have found earlier (filed as CELLSNET-40886) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.