poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "rahul.soa" <rahul....@googlemail.com>
Subject Re: [Excel- Blank/Empty Cell]
Date Sat, 04 Jun 2011 11:03:42 GMT
Many thanks Dave, I will have a look for MissingCellPolicy.

Best Regards,
rahul

On Wed, Jun 1, 2011 at 5:00 PM, Dave Fisher <dave2wave@comcast.net> wrote:
> Hi -
>
> Look for MissingCellPolicy and set it according to your needs.
>
> Regards,
> Dave
>
> On Jun 1, 2011, at 4:48 AM, rahul.soa wrote:
>
>> Hi Hamza,
>>
>> Thanks for your email.
>>
>> It did not really work for me.
>>
>> for (HSSFRow row = (HSSFRow) rows.next(); rows.hasNext(); row =
>> (HSSFRow) rows.next()) {
>>                Iterator cells = row.cellIterator();
>>                for (HSSFCell cell = (HSSFCell) cells.next(); cells.hasNext();
>>                        cell = (HSSFCell) cells.next()) {
>> }
>>
>> I think [ cell = (HSSFCell) cells.next()) ] "cell" does not consider
>> blank/empty cell in the sheet so
>> cell.getStringCellValue().compareTo("") did not work for me.
>>
>> Now my requirement has changed, so changed my program accordingly.
>>
>> Rahul
>>
>> On Tue, May 31, 2011 at 2:24 PM, Hamza Abdelkebir
>> <hamza.abdelkebir@gmail.com> wrote:
>>> Hello,
>>> You could maybe try testing like this
>>>
>>> cell.getStringCellValue().compareTo("");
>>>
>>> Not sure this workds though,
>>>
>>> Regards,
>>> --
>>> Hamza
>>>
>>>
>>>
>>>
>>> On Tue, May 31, 2011 at 2:20 PM, rahul.soa <rahul.soa@googlemail.com> wrote:
>>>
>>>> Hello Users, Devs,
>>>>
>>>> Sorry for asking a common question as I could not find the exact
>>>> answer, how to find a cell which is blank/empty (cell does not have
>>>> any value). Is there a way to know this? I have several rows of data
>>>> in xls file where in each row one or more cells are blank/empty. In my
>>>> program I would like to consider those blank/empty cells.
>>>>
>>>> Many Thanks,
>>>> Rahul
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
>>>> For additional commands, e-mail: user-help@poi.apache.org
>>>>
>>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
>> For additional commands, e-mail: user-help@poi.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Mime
View raw message