Hi Aspose team,
I’m encountering an issue where data in an .xls
file changes after I load and save it. For example, the number in a text box is 125 in the original file but becomes 145 after saving.
To investigate further, I extracted the output file and noticed that the shapeCheckSum
and textCheckSum
entries in the downrev.xml
file are missing.
I’m using Aspose.Cell version 25.6.
Sample : test.zip (599.2 KB)
Here is my code:
var workbook = new Workbook(@“D:\input.xls”);
workbook.Save(@“D:\output.xls”, SaveFormat.Excel97To2003);
Can you help me understand why the data changes after saving? Also, why are shapeCheckSum
and textCheckSum
entries missing from the output file? Please help me identify and fix the problem.
Thank you.
@dunghnguyen
Cause The issue you’re experiencing with the data changing after loading and saving an .xls
file is likely due to how Aspose.Cells interprets the original file format and the specific properties of the text box that may not be preserved during the save operation. The absence of shapeCheckSum
and textCheckSum
entries in the downrev.xml
file indicates that some properties related to the shapes or text boxes are not being handled correctly. Solution To address this issue, follow these steps: 1. Update Aspose.Cells: Ensure you are using the latest version of Aspose.Cells. Version 25.6 may have bugs that have been resolved in later releases. 2. Check Text Box Properties: Review the properties of the text box in the original file. Specific formatting or properties may not be fully supported or may behave differently when saved. 3. Use Different Save Formats: Try saving the workbook in a different format (e.g., .xlsx
) to see if the issue persists. This can sometimes help in preserving more properties. 4. Inspect Warnings: Utilize the GetWarnings
method after loading the workbook to identify any warnings related to the loading process that might provide insight into what is being altered. Here’s a modified version of your code that includes checking for warnings: ```csharp
var workbook = new Workbook(@“D:\input.xls”); // Check for warnings
var warnings = workbook.GetWarnings();
foreach (var warning in warnings)
{ Console.WriteLine(warning);
} // Save the workbook
workbook.Save(@“D:\output.xls”, SaveFormat.Excel97To2003);
- If the problem persists, reach out to Aspose support with the specific file and details about the text box properties for further assistance. Please let me know if you need any further help!
@dunghnguyen
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): CELLSNET-58612
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
If you save textbox to xls file since MS Excel 2007 or above version, there will be two shapes(legal in xls and modern in xlsx). We should check which shapes should be loaded according shapeCheckSum
and textCheckSum
, but Microsoft does not provide algorithm. We will try to find algorithm of shapeCheckSum
and textCheckSum
.