Hi, we’ve gotta new serious problem that we’d like to be fixed ASAP because it’s found in a production environment.
Here is a piece of code:
import java.io.InputStream;
import com.aspose.cells.Workbook;
public class CalcFail
{
public static Workbook createWB(InputStream inputStream)
{
try
{
return new Workbook(inputStream);
}
catch (Exception e)
{
e.printStackTrace();
throw new RuntimeException(e);
}
}
public static void main(String[] args) throws Exception
{
Workbook workbook = createWB(CalcCrash.class.getResourceAsStream(“pyatnadcat.xlsx”));
System.out.println("result should be : " + workbook.getWorksheets().get(“eval_fail”).getCells().get(“D26”).getValue());
workbook.calculateFormula();
System.out.println("result after calc : " + workbook.getWorksheets().get(“eval_fail”).getCells().get(“D26”).getValue());
workbook.dispose();
}
}
This code makes a very simple thing. It takes a cell value previously calculated by Excel then calculates it by Aspose.Cells and takes the result again. The result is different
The source Excel file you can find in attachment