You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by riddhikod <ri...@gmail.com> on 2011/10/14 15:55:35 UTC
Getting Cell value null for row.getCell(lILcv)
Hi,
I have written a program to read the Cell value and strikeout its
content. Unfortunately, It is constantly returning null in spite of presence
of content within the Cell.
Googling suggest two possible reasons for it:-
1> Missing Cell policy
2> Cell not defined.
Can you please suggest possible reason for it?
Regards,
Riddhi.
--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Getting-Cell-value-null-for-row-getCell-lILcv-tp4902644p4902644.html
Sent from the POI - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
Re: Getting Cell value null for row.getCell(lILcv)
Posted by riddhikod <ri...@gmail.com>.
But, I am having same problem for a another cell that I am trying to update.
Btw, just a confirmation. The cells have values in it and are not
undefined.
--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Getting-Cell-value-null-for-row-getCell-lILcv-tp4902644p4904317.html
Sent from the POI - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
Re: Getting Cell value null for row.getCell(lILcv)
Posted by Nick Burch <ni...@alfresco.com>.
On Fri, 14 Oct 2011, riddhikod wrote:
> I check the Sheet and the workbook. So that is fine. As far as
> the Cell is concerned, Some row it is updating while for others it is not.
You'll need to ensure all the cells you want to style exist, and create
them if not.
Nick
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
Re: Getting Cell value null for row.getCell(lILcv)
Posted by riddhikod <ri...@gmail.com>.
Hey Nick,
I check the Sheet and the workbook. So that is fine. As far as
the Cell is concerned, Some row it is updating while for others it is not.
Please find the sample code that strikes out the excel content:-
font.setStrikeout(true);
style.setFont(font);
cell=row.getCell(lILcv);
if(cell !=null){
cell.setCellStyle(style);
}
It is working for some cell in the row while not for others...
:(.
Regards,
Riddhiman.
--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Getting-Cell-value-null-for-row-getCell-lILcv-tp4902644p4902759.html
Sent from the POI - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
Re: Getting Cell value null for row.getCell(lILcv)
Posted by Nick Burch <ni...@alfresco.com>.
On Fri, 14 Oct 2011, riddhikod wrote:
> I have written a program to read the Cell value and strikeout its
> content. Unfortunately, It is constantly returning null in spite of presence
> of content within the Cell.
If row.getCell returns null, then there's nothing in that cell. (Depending
on your missing cell policy, you can control how blank cells and missing
cells are treated)
I'd suggest you double check you're fetching the right row and the right
sheet
Nick
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org