# Test empty cell in Taro package \[maybe basic pointer manipulation\]

**URL:** https://discourse.julialang.org/t/test-empty-cell-in-taro-package-maybe-basic-pointer-manipulation/5588
**Category:** General Usage
**Created:** [August 27, 2017, 2:09pm UTC](https://discourse.julialang.org/t/test-empty-cell-in-taro-package-maybe-basic-pointer-manipulation/5588 "2017-08-27T14:09:59Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Olivier\_Garet](https://avatars.discourse-cdn.com/v4/letter/o/5f9b8f/32.png) [@Olivier\_Garet](https://discourse.julialang.org/u/Olivier_Garet)
#### Post date: [August 27, 2017, 2:09pm UTC](https://discourse.julialang.org/t/test-empty-cell-in-taro-package-maybe-basic-pointer-manipulation/5588/1 "2017-08-27T14:09:59Z")

</div>

Hi,  
I’m using the Taro package to deal with excel sheets. I simply want to test if a cell is empty or not.

When Cell 1 in line r is not empty, getCell(r,1) returns something like  
JavaCall.JavaObject{Symbol(“org.apache.poi.ss.usermodel.Cell”)}(Ptr{Void} @0x0000000004199608)

When Cell 2 and 3 are empty, both getCell(r,2) and getCell(r,3) return  
JavaCall.JavaObject{Symbol(“org.apache.poi.ss.usermodel.Cell”)}(Ptr{Void} @0x0000000000000000)

But getCell(r,2)==getCell(r,3) is false, I wanted it to be true.  
I used the dirty hack to compare string(getCell(r,2)) and string(JavaCall.JavaObject{Symbol(“org.apache.poi.ss.usermodel.Cell”)}(0)),  
but there should be a better way.

Thanks in advance,

Olivier

---

<div class="post-metadata">

### Author: ![avik](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/avik/32/17_2.png) [@avik](https://discourse.julialang.org/u/avik)
#### Post date: [August 28, 2017, 1:04am UTC](https://discourse.julialang.org/t/test-empty-cell-in-taro-package-maybe-basic-pointer-manipulation/5588/2 "2017-08-28T01:04:07Z")

</div>

Check `isnull(getCell(r,2))` . That will return true when cell does not exist in the sheet.

Note that in some cases, for example, if you type a value into a cell, then delete it, it might look empty visually, but `getCell` will return a non-null value, but `getValue` will then return an empty string … Yes excel is wierd.
