This is a consequence of a feature inherited by all spreadsheet programs
from the very beginning.  The first single or double quote entered into a
cell is grabbed and used to control the alignment of the remaining data in
the cell, and so is not part of the "value" of the cell.  So when entering
data into a cell which starts with a quote you must prefix it with another
quote mark.  I have never found a way around this.

----- Original Message ----- 
From: "Eddy Wu (C)" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 01, 2004 9:00 PM
Subject: Single quotes in text cells


Is there a way to capture the first single quote when using the HSSFCell
class for a text field cell.

For example:
'xyz' is in the excel spreadsheet cell.  When I call the method
getStringCellValue() to retreive the value I only get xyz' minus the
first single quote.  I am able to retreive the first single quotes if I
escape it in excel as ''xyz' but I do not want to require my users to
remember to escape single quotes every time.  Is there a way around
this?



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to