{
sheetHelper.exportHyperlink(rowIndex, colIndex, href);
}
TextValueHandler handler =
new TextValueHandler()
{
public void handle(BooleanTextValue textValue) throws JRException {
writeText();
}
public void handle(DateTextValue textValue) throws JRException {
Date date = textValue.getValue();
sheetHelper.write(
"<v>"
+ (date == null ? "" : JRDataUtils.getExcelSerialDayNumber(
date,
getTextLocale(text),
getTextTimeZone(text)
))
+ "</v>"
);
}
public void handle(NumberTextValue textValue) throws JRException {
Number number = textValue.getValue();
sheetHelper.write(
"<v>"
+ (number == null ? "" : number)
+ "</v>"
);
}
public void handle(StringTextValue textValue) throws JRException {
writeText();
}
private void writeText() throws JRException {
sheetHelper.write("<is>");//FIXMENOW make writer util; check everywhere
if (textLength > 0)
{
exportStyledText(text.getStyle(), styledText, getTextLocale(text));
}
sheetHelper.write("</is>");
}
};
if (textValue != null)
{
//detect cell type
textValue.handle(handler);
}
else
{
handler.handle((StringTextValue)null);
}
sheetHelper.flush();
cellHelper.exportFooter();