FileDocCategorySizeDatePackage
HyperlinkFormula.javaAPI DocApache Poi 3.0.11951Mon Jan 01 12:39:42 GMT 2007org.apache.poi.hssf.usermodel.examples

HyperlinkFormula

public class HyperlinkFormula extends Object
Test if hyperlink formula, with url that got more than 127 charaters, works
author
Bernard Chesnoy

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)

    	HSSFCell	cell;
    	
        HSSFWorkbook wb = new HSSFWorkbook();
        HSSFSheet sheet = wb.createSheet("new sheet");
        HSSFRow row = sheet.createRow((short) 0);

        cell = row.createCell((short)0);
        cell.setCellType(HSSFCell.CELL_TYPE_FORMULA);
        cell.setCellFormula("HYPERLINK(\"http://127.0.0.1:8080/toto/truc/index.html?test=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"test\")");

        FileOutputStream fileOut = new FileOutputStream("workbook.xls");
        wb.write(fileOut);
        fileOut.close();