You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by shankarrao <sh...@gmail.com> on 2011/01/27 10:57:49 UTC

Error displayed in one of the formula cells of the Excel sheet

Hi, I am seeing an error in one of the Formula cells in my worksheet. Please
find the attached image for the error description. Could you please let me
know the possible cause of this error?

http://apache-poi.1045710.n5.nabble.com/file/n3359452/Excel_Error.jpg 

Below is the code block that is showing the error:
String formula = "SUM(A1:A90)";
Cell cell = row.createCell(col);
cell.setCellType(2);
cell.setCellFormula(formula);
cell.setCellStyle(locked);

Thanks for your help!
Shankar
-- 
View this message in context: http://apache-poi.1045710.n5.nabble.com/Error-displayed-in-one-of-the-formula-cells-of-the-Excel-sheet-tp3359452p3359452.html
Sent from the POI - User mailing list archive at Nabble.com.

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


Re: Error displayed in one of the formula cells of the Excel sheet

Posted by Mark Beardsley <ma...@tiscali.co.uk>.
If my assumption was correct - that there is a value in cell A91 of your
sheet, then it can be safely ignored. All Excel is trying to do is prevent
inexperienced users from making mistakes and it can result in annoying
issues like this one. Just be certain that your formulas are correct - in
this case that all necessary cels are included in the computation, and you
should be fine.

Yours

Mark B
-- 
View this message in context: http://apache-poi.1045710.n5.nabble.com/Error-displayed-in-one-of-the-formula-cells-of-the-Excel-sheet-tp3359452p3363256.html
Sent from the POI - User mailing list archive at Nabble.com.

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


Re: Error displayed in one of the formula cells of the Excel sheet

Posted by shankarrao <sh...@gmail.com>.
Mark,
Thanks for your inputs. Can this warning message be ignored or do we need to
provide a fix for it?
-- 
View this message in context: http://apache-poi.1045710.n5.nabble.com/Error-displayed-in-one-of-the-formula-cells-of-the-Excel-sheet-tp3359452p3362765.html
Sent from the POI - User mailing list archive at Nabble.com.

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


Re: Error displayed in one of the formula cells of the Excel sheet

Posted by Mark Beardsley <ma...@tiscali.co.uk>.
Sorry to say that you will not be able to turn off this 'feature' easilly and
using a template file will certainly not help. The problem is that these
settings all relate to the application and not to the file, as such, the
only way to modify them is whilst the application is running either through
user intervention or a macro.

Yours

Mark B
-- 
View this message in context: http://apache-poi.1045710.n5.nabble.com/Error-displayed-in-one-of-the-formula-cells-of-the-Excel-sheet-tp3359452p3361601.html
Sent from the POI - User mailing list archive at Nabble.com.

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


Re: Error displayed in one of the formula cells of the Excel sheet

Posted by Mark Beardsley <ma...@tiscali.co.uk>.
As far as I am aware, Excel is simply trying to warn you that there are
values in cells that it thinks you may have neglected to include in the
formula. In this case, I am going to guess that there is a vlue in cell A91
as well as this would be enough to trigger the error message.

The only way I know of to avoid this problem is to change the Error Checking
options for the workbook (Tools>Options>Error Checking in Excel) and here
you may have a problem because, as far as I am aware, you are targetting the
SS stream to support both binary and SpreadsheetML files and these error
checking 'features' were introduced when Office 2007 was released. The best
option I know of at the moment it to use Excel and create a template file
with the Error Checking options set as you requite them. Then you can open
this file with POI and populate it as you are doing now without - hopefully
- encountering similar messages.

Yours

Mark B
-- 
View this message in context: http://apache-poi.1045710.n5.nabble.com/Error-displayed-in-one-of-the-formula-cells-of-the-Excel-sheet-tp3359452p3360029.html
Sent from the POI - User mailing list archive at Nabble.com.

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