Hello,
We have encountered a problem when working with Excel 2003 workbooks involving large Worksheet Custom Property values, this is working fine when using Excel 2007 workbooks:
These are the steps to reproduce:
1. Using Ms Office create an Excel 2003 Spreadsheet
2. Add to the worksheet “Sheet1” a custom property (using VBA) and save:
ActiveSheet.CustomProperties.Add Name:=“VeryLongString”, Value:="the long string value…"
Note: The value string should be greater than 4500 characters.
Ms Office Excel saves the value correctly inside the .xls file.
3. Using Aspose.Cells open the spreadsheet:
var workbook = new Workbook(path);
4. Check for the existence of the custom property on the worksheet Sheet1:
var customPropery = workbook.Worksheets[“Sheet1”].CustomProperties[“VeryLongString”];
You will notice that the customPropery is null.
This also impacts the Save functionality, saving the above workbook will not include the custom property.
We are using Aspose.Cells version 7.1.0.0.
Thank you in advance,
Bogdan Rusu.
Hi,
Hello,
Thank you for the reply, I’ve attached the .xls file as zip archive.
I will also try the latest version of Aspose.Cells and keep you posted.
Thank you,
Bogdan Rusu.
Hi,
Hello,
In my original post I was reffreing to the “Worksheet Custom Properties”, these properties are added programmatically (via macros/VBA, 3rd party Excel addins, etc.) and their values are static once added.
These are accessed from code using Aspose.Cells in the following way:
var workbook = new Workbook(path);
var customPropery = workbook.Worksheets[“Sheet1”].CustomProperties[“customPropertyName”];
‘customPropery’ will reference the CustomProperty named “customPropertyName” from the worksheet “Sheet1” inside the workbook.
Your last reply is reffering to “Office Button|Prepare|Properties” which is a different thing, these are Workbook-level properties.
These are accessed from code using Aspose.Cells in the following way:
var workbook = new Workbook(path);
var properties = workbook.BuiltInDocumentProperties;
‘properties’ will reference the Workbook-level properties.
Regarding your comment “custom property is added via a macro which should be run when opening the file into MS Excel” I must point that no macro is required to be run for the attached Excel document, it already contains the custom property on the “Sheet1”.
I have attached a new version of the Excel workbook this time containing no macros, it already contains the Custom Property named “VeryLongString” on worksheet “Sheet1”.
I have also verified using the latest version of Aspose.Cells, version 7.1.2, but the problem persists.
To summarize the conclusion is that Aspose.Cells should not remove existing large Worksheet Custom Properties for Excel 2003 workbooks as it does with Excel 2007 workbooks.
Thank you,
Bogdan Rusu.
Hi,
Hello,
Thank you for your help, I’ll be waiting for the fix.
Regards,
Bogdan Rusu.
Hi,
Thank you for the fixed version, verified it and works fine.
Another question, I presume that this fix will be persisted to future releases of Aspose.Cells, is that correct?
Regards,
Bogdan Rusu.
Hi,
It’s good to know your problem is resolved now.
Yes, that’s correct. All future releases will contain this fix.
If you get any other question, please feel free to ask. We will help you asap.
The issues you have found earlier (filed as CELLSNET-40470) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.
Hi,
Thanks for using Aspose.Cells.
We only plan to create, manipulate or embed VBA codes/ macros later. We however cannot support to run or execute macros. Does it fit your needs?