I am working on a requirement where I am using formulas to refer to another worksheet in the excel.
The way I am generating the excel file is:
1) Generate excel files for each of the worksheets using xslt
2) Merge these excel files into the final excel file.
Hence in step1 when the excel file having the formula is generated through xslt, only the formula is generated although the worksheet referring to is not yet available in the workbook.
After merging I am using Aspose calculateformula function to evaluate the formulae in the excel sheets.
But in case if I am opening the file through Aspose after Step1 to do some modification to the file, the formulas in the file is getting messed up and the formulas are not evaluated correctly after merging of the file and CalculateFormula at Step2.
Attached File1 is the xslt transformed file.
Here is the code I am using to format the excel:
public override void FormatReport(string reportFilePath, string reportName)
Workbook excelReportWorkbook = new Workbook(reportFilePath);
Worksheet workSheet = excelReportWorkbook.Worksheets;
workSheet.Name = reportName;
Attached File2 is the file after applying the above the code and the formula getting messed up.
What modification can I make to the above function so that the excel formulas do not get modified while saving the workbook?