Package org.apache.poi.hssf.usermodel

Examples of org.apache.poi.hssf.usermodel.HSSFWorkbook.createSheet()


import org.apache.poi.ss.usermodel.DataFormat;

public class PoiTest {
  public static void main(String[] args) throws IOException {
    HSSFWorkbook wb = new HSSFWorkbook();
    HSSFSheet sheet = wb.createSheet("new sheet");

    // Create a row and put some cells in it. Rows are 0 based.
    HSSFRow row = sheet.createRow(0);

    // Create a cell and put a date value in it. The first cell is not
View Full Code Here


        Preferences coreStore = BrowserCorePlugin.getDefault().getPluginPreferences();
        String valueDelimiter = coreStore.getString( BrowserCoreConstants.PREFERENCE_FORMAT_XLS_VALUEDELIMITER );
        int binaryEncoding = coreStore.getInt( BrowserCoreConstants.PREFERENCE_FORMAT_XLS_BINARYENCODING );

        HSSFWorkbook wb = new HSSFWorkbook();
        HSSFSheet sheet = wb.createSheet( "Export" ); //$NON-NLS-1$

        // header
        HSSFRow headerRow = sheet.createRow( 0 );
        LinkedHashMap<String, Short> attributeNameMap = new LinkedHashMap<String, Short>();
        if ( this.exportDn )
View Full Code Here

   * This test makes sure that any {@link MissingArgEval} that propagates to
   * the result of a function gets translated to {@link BlankEval}.
   */
  public void testMissingArg() {
    HSSFWorkbook wb = new HSSFWorkbook();
    HSSFSheet sheet = wb.createSheet("Sheet1");
    HSSFRow row = sheet.createRow(0);
    HSSFCell cell = row.createCell(0);
    cell.setCellFormula("1+IF(1,,)");
    HSSFFormulaEvaluator fe = new HSSFFormulaEvaluator(wb);
    CellValue cv;
View Full Code Here

  @Override
  public void processExport(OutputStream output) {

    try {
      HSSFWorkbook workbook = new HSSFWorkbook();
      HSSFSheet sheet = workbook.createSheet(exportConf.getFileName());
      Row row = null;
      Cell cell = null;
      int rowIndex = 0;
      int columnIndex;
View Full Code Here

     
    Workbook workbook = new HSSFWorkbook();
     
    for (int cnt=0; cnt<tests.size(); cnt++) {
      setColumns(tests.get(cnt));
      Sheet sheet = workbook.createSheet("Test " + cnt);
      Row row = sheet.createRow(0);

      int counter = 2; //A counter which is used to determine how many additional columns are needed.
      createCell(workbook, row, 0, "Grupa", CellStyle.ALIGN_CENTER, CellStyle.VERTICAL_CENTER);
      createCell(workbook, row, 1, "Indeks", CellStyle.ALIGN_CENTER, CellStyle.VERTICAL_CENTER);
View Full Code Here

        return fileName;
    }

    public void performExport(DataExportModel model, DataExportInstructions instructions, ConnectionHandler connectionHandler) throws DataExportException {
        HSSFWorkbook workbook = new HSSFWorkbook();
        HSSFSheet sheet = workbook.createSheet(model.getTableName());

        if (instructions.createHeader()) {
            HSSFRow headerRow = sheet.createRow(0);

            for (int columnIndex = 0; columnIndex < model.getColumnCount(); columnIndex++){
View Full Code Here

    }
    String infoString = "Genererer excel-fil...rad ";
    HSSFWorkbook wb = new HSSFWorkbook();
    HSSFSheet sheet;

    sheet = wb.createSheet("sheet");
    int currentRow = 0;
    HSSFRow row;
    HSSFCell cell;

    CellStyle cellStyle = new CellStyle(wb, (short) headFontSize);
View Full Code Here

    if (directory == null || directory.length() == 0) {
      throw new ProTransException("Katalog ikke satt");
    }

    HSSFWorkbook wb = new HSSFWorkbook();
    HSSFSheet sheet = wb.createSheet("sheet");

    int currentRow = 0;
    int startCell = 0;

    HSSFRow row;
View Full Code Here

   */
  public static HSSFWorkbook output(String sheetName,
      String[] columnPropterties, String[] columnNames, List<?> list)
  {
    HSSFWorkbook workbook = new HSSFWorkbook();
    HSSFSheet sheet = workbook.createSheet(sheetName);
    // 创建第1行,也就是输出表头
    HSSFRow row = sheet.createRow(0);
    HSSFCell cell;
    for (int i = 0; i < columnNames.length; i++)
    {
View Full Code Here

 
  /** bug 35027, underscore in sheet name*/
  public void testUnderscore() {
    HSSFWorkbook wb = new HSSFWorkbook();
     
      wb.createSheet("Cash_Flow");;
     
      HSSFSheet sheet = wb.createSheet("Test");
      HSSFRow row = sheet.createRow(0);
      HSSFCell cell;
     
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.