Win a copy of Emmy in the Key of Code this week in the General Computing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

Reading only text content of the foruma cell + POI 3.5

 
Ranch Hand
Posts: 763
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am trying to read the excel file using poi 3.5 but i am not able to read the Cell with formula.

bellow is the code which i have tried.




Stack Trace


For setting up the workbook environment i need to know which workbook is being referred in this excel file which i want to avoid. I just want to read the simple text content of the formula.

Isn't there any simple way to read the text content of the formula cell in POI ? like jxl is having.

 
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you don't want to evaluate the formula, then why are you doing so? The Cell interface has a method that returns the cell type, and it has a method for getting the formula if that's the cell type.
 
Jigar Naik
Ranch Hand
Posts: 763
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ya right. but i don't want to know the formula. i want to know the actual value of the cell not the formula.
 
Lester Burnham
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah, OK. You said "text content of the formula" which sounded like you wanted the actual formula, not what it evaluates to. If the formula references an external file, and that file is not available, then you're probably out of luck.
 
Jigar Naik
Ranch Hand
Posts: 763
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
file is there in the same folder. but what i am wondering how does JXL api is able to retrieve the value without specifying the external file.
 
You showed up just in time for the waffles! And this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!