I have a Workbook which has 5 Sheets.
I am importing CSVs in Sheet1, Sheet2 and Sheet3. Sheet4 has some static data.
Sheet 5 has some formulas and lookups which are based on the data in the previous 4 Sheets.
I am using calculateFormula() method to calculate all the formulas and then I save the Sheet5 with a new name as a CSV file.
I have used following logic to get the expected functionality:
Workbook wb = new Workbook(“D:\Excel1.xlsx”);
// Logic to import all the CSVs
Worksheet sheet = wb.getWorksheets().get(“Sheet5”);
wb.save(sworkingfolder + “Sheet5_new.csv”);
The issue I am facing is that in my CSV file, some cells having formulas are showing the proper values whereas some cells having formulas are showing #N/A.
Just for the verification if formulas are correct, I tried putting the data manually and all formulas were working.
Is there any solution which checks whether all the formulas in the workbook are calculated. So I can save the Sheet5_new.csv only after calculations is done.