aspose file tools*
The moose likes Other Open Source Projects and the fly likes Reading only text content of the foruma cell + POI 3.5 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Reading only text content of the foruma cell + POI 3.5" Watch "Reading only text content of the foruma cell + POI 3.5" New topic
Author

Reading only text content of the foruma cell + POI 3.5

Jigar Naik
Ranch Hand

Joined: Dec 12, 2006
Posts: 755
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.


Jigar Naik


Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
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

Joined: Dec 12, 2006
Posts: 755
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

Joined: Oct 14, 2008
Posts: 1337
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

Joined: Dec 12, 2006
Posts: 755
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Reading only text content of the foruma cell + POI 3.5