Leggendo la documentazione dice cheil metodo: getContents
public java.lang.String getContents()
Quick and dirty function to return the contents of this cell as a string.
--> For more complex manipulation of the contents, it is necessary to cast this interface to correct subinterface
Returns:
the contents of this cell as a string
In pratica suggerisce che per una manipolazione più complessa dei contenuti è necessario effettuare un cast sulla corretta sotto interfaccia... potresti provare a fare cast semplici e vedere cosa succede e poi leggendo un po' la documentazione ho visto che il metodo getValue() forse potrebbe essere applicato anche al tuo caso, sotto ti ho riportato il codice, prova afare delle prove con dei cast applicati a getContents() o anche ad usare il metodo getValue() abbinato o meno al getContents(), spero di averti aiutato.. bye!
![]()
getValue() - Method in interface jxl.BooleanCell
Gets the boolean value stored in this cell.
getValue() - Method in interface jxl.NumberCell
Gets the double contents for this cell.
getValue() - Method in class jxl.format.Alignment
Gets the value of this alignment.
getValue() - Method in class jxl.format.BoldStyle
Gets the value of the bold weight.
getValue() - Method in class jxl.format.BorderLineStyle
Gets the value for this line style
getValue() - Method in class jxl.format.Colour
Gets the value of this colour.
getValue() - Method in class jxl.format.Orientation
Accessor for the binary value
getValue() - Method in class jxl.format.PaperSize
Accessor for the internal binary value association with this paper size
getValue() - Method in class jxl.format.Pattern
Gets the value of this pattern.
getValue() - Method in class jxl.format.ScriptStyle
Gets the value of this style.
getValue() - Method in class jxl.format.UnderlineStyle
Gets the value of this style.
getValue() - Method in class jxl.format.VerticalAlignment
Accessor for the binary value
getVersion() - Static method in class jxl.Workbook
Accessor for the software version