We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

URGENT! Function =CELL("filename") not supported

Hi,

In Excel the function =CELL(“filename”) returns the current file name. I noticed that Aspose doesn’t support this function. When I use the calculateFormula function, it returns “#VALUE” for this formula. In Excel it works properly.

Is it possible to implement this function or use any kind of workaround?

Hi,


Thanks for providing us some details.

Could you provide us your template Excel file(s) that contains this formula that is evaluated fine by opening it into Ms Excel, we will check it soon.

Thank you.

Here is the example.

Hi,


Thanks for the template file.

I have tested your scenario/ case using our latest version v8.3.1 () with your template file and it calculates correct value for the CELL function. Please try our latest version v8.3.1 by downloading it here:
http://www.aspose.com/community/files/72/java-components/aspose.cells-for-java/entry592876.aspx
e.g
Sample code:

Workbook workbook = new Workbook(“Exemplo.xlsx”);
workbook.calculateFormula();
System.out.println(workbook.getWorksheets().get(0).getCells().get(“B2”).getStringValue()); // [Exemplo.xlsx]Sheet1 - Ok


Let us know if you still find the issue.

Thank you.

Hi,

Still receiving #VALUE here. I’m running aspose.cells on a LINUX machine. It should return que file with LINUX path. Can you check if it works on LINUX?

Hi,

Thanks for your posting and using Aspose.Cells.

We have tested this issue on Ubuntu Linux with the latest version: Aspose.Cells for Java 8.3.1 and it worked quite fine. Please make sure you are using the latest version.

We tested it with the following sample code. I have also displayed the Console Output of the code for your reference.

Java


String filePath = “/home/shakeel/Downloads/windows-share/Exemplo.xlsx”;


Workbook workbook = new Workbook(filePath);


Worksheet worksheet = workbook.getWorksheets().get(0);


Cell cell = worksheet.getCells().get(“B2”);


System.out.println(cell.getStringValue());


workbook.calculateFormula();


cell = worksheet.getCells().get(“B2”);


System.out.println(cell.getStringValue());

Console Output:
iMac SSD:Users:mauricioritter:Downloads:[Exemplo.xlsx]Sheet1
[/home/shakeel/Downloads/windows-share/Exemplo.xlsx]Sheet1