Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Reading only text content of the foruma cell + POI 3.5

 
Jigar Naik
Ranch Hand
Posts: 762
  • 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.

 
Lester Burnham
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: 762
  • 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: 762
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic