wood burning stoves 2.0*
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
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: 753
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: 753
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: 753
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.
 
Consider Paul's rocket mass heater.
 
subject: Reading only text content of the foruma cell + POI 3.5
 
Similar Threads
Blank cells in Excel causing problems
Read a .xls,.xlsx file format using XSSF
Created Excel file is missing something
evaluation of formula cell value in xls poi
How do i format a string to date