Please refer to the attached spreadsheet. I have one excel file(Testing_Split_ReferOtherWorksheets.xlsx), with two sheets(Pool Summary, Center Summary), Center Summary sheet refers to the values in Pool Summary sheet. I need to create two files one sheet each. The values are lost in second file which contains Center Summary.
I am using Aspose cells version 5.1.1.0 I think the copy does copies the whole sheet as it is. How the values can be copied in place of formulas.
For: "The values are lost in second file which contains Center Summary. "
The reason is simple, your worksheet “Center Summary” contains a formula that references to the first worksheet in the Excel file, so when you copy that worksheet in another Workbook, this reference would not evaluated fine and you will get #REF! error for the formula value in A4 cell.
Well, you may put the calculated value into that cell before copying this worksheet to other Workbook as a workaround, see the sample code below.
Sample code: var inputDocument = new Workbook(“e:\test2\Testing_Split_ReferOtherWorksheets.xlsx”);
var outputDocument = new Workbook();
inputDocument.CalculateFormula();
var sourceWorksheet = inputDocument.Worksheets[“Center Summary”]; foreach (Aspose.Cells.Cell cell in sourceWorksheet.Cells) { if (cell.IsFormula) {
cell.PutValue(cell.Value.ToString(), true); }
}
var destinationWorksheet = outputDocument.Worksheets.Add(“Center Summary”);
1) There is no issue at all for Workbook.CalculateFormula whether there are formulas in the worksheet or there are no formulas in the worksheet. 2) I am afraid, there is no such method in Aspose.Cells for .NET API. 3) Your understanding is correct. 4) You can simply use Range.Copy(Range,PasteOptions) overloaded method to implement your need See the simple code segment here for your reference: Cells cells = workbook.Worksheets[0].Cells; Range range = cells.CreateRange(“B1:G1”); Range dRange = cells.CreateRange(“A10:F10”); PasteOptions options = new PasteOptions(); options.PasteType = PasteType.AllExceptBorders; options.Transpose = true; dRange.Copy(range, options);
I have tested your issue, it takes very high memory to perform the process. It takes very long time and the memory was going up and up. I waited for some time and then I terminated the process. I have logged an issue with an id: CELLSNET-29461. We will figure it out soon.
We are getting System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown with the attached spreadsheet while calling CalculateFormula() method. Please resolve this ASAP as it is effecting in production environment.
Iam getting below error while using this dll. Is there a workaround for testing this. Thanks.
The subscription included in this license allows free upgrades until 11 Aug 2011, but this version of the product was released on 24 Aug 2011. Please renew the subscription or use a previous version of the product.
You just comment out the licensing lines of code (your license is expired to use this latest fixed version v6.0.1.9) and test the issue if it works fine. If everything is fine, you may upgrade your subscription.
so, if we don’t have budget to upgrade the software license, which is several thousand dollars, since we have the total.net suite, are we just stuck with this, even though we had to identify the issue for you and this bug locks up the server? I don’t expect a free upgrade, just a bug fix that works with my version of the code. seems a bit of a steep cost for a bug fix. we aren’t looking for any new features. are there no other options?
Please post your question on Aspose.Purchase forum. Aspose Sales Staff members will guide you better and let you know any available and viable options.
I tried with the V7 dll. Now the calculateformula() isn't throwing exception but while saving the output document it is throwing exception.
I am taking out the worksheets (INSTrialBalance,INSBalance Sheet, INSSummary, INSRooms, INSFood, INSOther) from the attached excel and saving them as separate files. But while saving the document it fails. Can you please investigate what is the root cause for this.