I have created a .xlsx workbook using VSTS2008 which is password protected.
After that i am writing custom code to do silent installation so that the workbook can be opened at any location without copying .vsto file in that location.
I am using Aspose.cells on this workbook to do some changes and saving it. Once i open this file it is showing "some of the data has been lost" info message.
Can you tell me what should i do so that when i open this file it should not show this message.
Attached are the files having code to do silent installation and generating excel using Aspose.cells
Please post your template XLSX file generated by VSTO2008. We need to process this file by Aspose.Cells API by using your sample code.
Moreover, kindly do post the processed file by Aspose.Cells API. Also, which version you are using of the product. We recommend you to try our latest v5.1.3.
I could not find the issue. I used your template “VSTOWorkbook.xlsx” file and processed the sample code given in “ExcelReaderWriter.cs” file to generate “VSTOWorkbook1.xlsx” file (attached). The output file opens fine in MS Excel 2007 without any error message.
I have attached the output file, also I have attached the latest version (v5.1.3.3) here which I am using.
My Sample code:
try { //Instantiating a Workbook object
var workbook = new Workbook(“e:\test\visto\VSTOWorkbook.xlsx”);
//Adding numeric values to “B5” & “B6” cells workbook.Worksheets[0].Cells[“B5”].PutValue(3); workbook.Worksheets[0].Cells[“B6”].PutValue(4);
//Adding a formula to “B7” cell to get the result after adding the values workbook.Worksheets[0].Cells[“B7”].Formula = “=SUM(B5:B6)”; workbook.CalculateFormula();
//Loop through all the columns in the worksheet and unlock them for (int i = 0; i <= 255; i++) { style = sheet.Cells.Columns[(byte)i].Style; style.IsLocked = false; flag = new StyleFlag(); flag.Locked = true; sheet.Cells.Columns[(byte)i].ApplyStyle(style, flag); }
// Get the first row style style = sheet.Cells.Rows[0].Style;
// Lock it style.IsLocked = true;
// Instantiate the flag flag = new StyleFlag();
// Set the lock setting flag.Locked = true;
// Apply the style to the first row sheet.Cells.ApplyRowStyle(0, style, flag);
// Protect the sheet sheet.Protect(ProtectionType.All); }
Now I can find the issue using your provided file with my sample code (mentioned in the previous post). When I open the generated file, I can find the issue in MS Excel.
I have logged your issue into our issue tracking system with an id: CELLSNET-20491. We will look into your issue. We will also update you soon.
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Thanks for logging the issue.
The reason why excel is not able to open the file seems to be due to missing vstodatastore folder. Aspose.cells code appears to be deleting this VSTO folder inside the excel file. I verified this when I viewed the OOXML packages of the excel file after running the aspose code. Replacing this folder fixes the unreadable content issue.
We are at a stage where we need to make a decision on ordering your product. Your product is catering to all the other requirements except for this one but critical issue. Could you please update by when will you be able to fix this issue and release the updated one?
I hope you understand our urgency and get back soon to help us in arriving at a decision.
Well, you can use this fix as an official release. It is an intermediate kind of version which is provided as a fix against some bugs and new features. Normally, this kind of version is posted in the support forums. You can use this fix for your requirements as long as you wish; it will behave like an official release.
Moreover, it is to be noted here, our next official release would include all the functionality of the previous fixes (including all the intermediate versions till the next official release). And our next release is due within 10 - 15 days or so.