VSTO workbook showing message after running through Aspose.cells v5.1.3.0

Hi,

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

Thanks

Hi,

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.


Thank you.

Hi,

Please find attached VSTO generated file.Paste these files in the project and copy only the VSTOWorkbook.xlsx at D: drive

Run the SilentInstallation.cs code on this then use that .xlsx file in ExcelReaderWriter.cs

The file generated after SilentInstallation.cs is not showing any message on opening while after ExcelReaderWriter it is.

I am using the latest version of Aspose.cells

Thanks

Hi,

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”);

//Unprotect Workbook
workbook.Worksheets[0].Unprotect(“hi”);

//New Worksheet Added
workbook.Worksheets.Add();

//Inserting a row into the worksheet at 3rd position
workbook.Worksheets[0].Cells.InsertRow(1);

//Inseting a column into the worksheet at 2nd position
workbook.Worksheets[0].Cells.InsertColumn(1);

workbook.Worksheets[0].Comments.Add(1, 0);
var comment = workbook.Worksheets[0].Comments[1, 0];
comment.Note = “New Row”;

workbook.Worksheets[0].Cells[0, 1].PutValue(“New Column”);

//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();

//Protect worksheet
ProtectRow(workbook.Worksheets[0]);

///workbook.Worksheets[0].Protect(ProtectionType.All,“hi”,null);
///workbook.Protect(ProtectionType.All,“hi”);
///workbook.Worksheets[0].Cells.Rows[0].Style.IsLocked = true;
///workbook.Worksheets[0].Protection.AllowSelectingLockedCell = false;
//Column and row insertion/ deletion
workbook.Worksheets[0].Protection.AllowInsertingColumn = false;
workbook.Worksheets[0].Protection.AllowDeletingColumn = false;
workbook.Worksheets[0].Protection.AllowInsertingRow = true;
workbook.Worksheets[0].Protection.AllowDeletingRow = true;
///workbook.Worksheets[1].IsVisible = false;

workbook.Save(@“e:\test\visto\VSTOWorkbook1.xlsx”);
}
catch (Exception ex)
{
throw new FileNotFoundException(“File not found”, ex);
}

//…

private static void ProtectRow(Worksheet sheet)
{
//Define the style object
Style style;
StyleFlag flag;

//Define the styleflag object

//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);
}


Thank you.

Hi,

Can you please try with the excel attached, it is showing meesage here.

It contains some VSTO code in it.

Thanks

Hi,

Thanks for the template file(s).

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.

Thank you.

Hi,

<?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.

Thanks.

<!–[if gte mso 10]> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman","serif";}

<![endif]–>

Hi,

Please try the attached version (v5.1.3.4). We have fixed the issue you mentioned.

Thank you

Hi,

Thanks for the fix.

Is this included in the new release of the product? Please let us know as we are planning to buy this product.

Hi,


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.

Thank you.

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


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