Package jxl.write

Examples of jxl.write.WritableWorkbook.createSheet()


   private boolean writeXLS(File file, boolean includeHeaders, int nbrSelCols, int[] selCols, int nbrSelRows, TableExportCsvController ctrl, int[] selRows)
      throws IOException, WriteException
   {
      WritableWorkbook workbook = Workbook.createWorkbook(file);
      WritableSheet sheet = workbook.createSheet("Squirrel SQL Export", 0);


      int curRow= 0;
      if (includeHeaders)
      {
View Full Code Here


                SummaryStatBean.StatDataBean statDataBean = statdetails
                        .getData().get(0);

                if (changedType)
                {
                    sheet = workbook.createSheet(I18nUtil.getMessage("it.cilea.hku.statistics.Subscribe.sheet." + statdetails.getType()),
                            sheetNumber);
                    WritableFont labelFont = new WritableFont(
                            WritableFont.ARIAL, 10, WritableFont.BOLD);
                    WritableCellFormat cfobj = new WritableCellFormat(labelFont);
                    sheet.addCell(new Label(
View Full Code Here

            IllegalArgumentException, IllegalAccessException,
            InvocationTargetException
    {

        WritableWorkbook workbook = Workbook.createWorkbook(os);
        WritableSheet sheet = workbook.createSheet("Sheet", 0);

        // create initial caption (other caption could be write field together)
        int x = 0;
        sheet.addCell(new Label(x++, 0, "staffNo"));
        sheet.addCell(new Label(x++, 0, "rp"));
View Full Code Here

  public void writeExcel(Map<Point, String> toWrite, String filename, int rowBegin, int rowEnd, int colBegin,
      int colEnd) throws IOException, RowsExceededException, WriteException {
    OutputStream os = new FileOutputStream(filename);
    WritableWorkbook wwb = Workbook.createWorkbook(os);
    WritableSheet ws = wwb.createSheet("fuck sf", 0);
    int x, y;// д����У�������
    int i, j;
    for (i = rowBegin, x = 0; i < rowEnd; i++, x++) {
      for (j = colBegin, y = 0; j < colEnd; j++, y++) {
        String content = toWrite.get(new Point(j, i));
View Full Code Here

      try {
        workBook = Workbook.createWorkbook(outputStream);
      } catch (IOException e) {
        throw new RuntimeException(e);
      }
      WritableSheet sheet = workBook.createSheet("Results", 0);
 
      // Generates Headers Cells
      WritableFont headerFont = new WritableFont(WritableFont.TAHOMA, 12, WritableFont.BOLD);
      WritableCellFormat headerCellFormat = new WritableCellFormat(headerFont);
     // headerCellFormat.setBackground(Colour.PALE_BLUE);
View Full Code Here

   */
  public void writeXLS(String savaPath, String sheetName, int index,int rows, String[] contents) {
    WritableWorkbook workbook = null;
      try {
        workbook = Workbook.createWorkbook(new File(savaPath));    // 创建可写入的Excel工作薄
        WritableSheet ws = workbook.createSheet(sheetName, index)// 创建可写入的Excel工作表
        int cols = contents.length / rows;              // 根据行数得出列数,在数据库里比较容易得到行数
        for (int row = 0; row < rows; row++) {
          for (int col = 0; col < cols; col++) {
            Label label = new Label(col, row,contents[col + row * cols]);
            ws.addCell(label); // 添加Label对象,单元格内容
View Full Code Here

   */
  public static void writeXLS(OutputStream os,int rows, List datas) {
    WritableWorkbook workbook = null;
    try {
      workbook = Workbook.createWorkbook(os);          // 创建可写入的Excel工作薄
      WritableSheet ws = workbook.createSheet("Sheet1", 0)// 创建可写入的Excel工作表
      int cols = datas.size() / rows;              // 根据行数得出列数,在数据库里比较容易得到行数
      for (int row = 0; row < rows; row++) {
        for (int col = 0; col < cols; col++) {
          Label label = new Label(col, row,(String) datas.get(col + row * cols));
          ws.addCell(label); // 添加Label对象,单元格内容
View Full Code Here

    }

    @Override
    public void writeAll() throws FileNotFoundException, IOException{
        WritableWorkbook workbook = Workbook.createWorkbook(outputFile);
        WritableSheet sheet = workbook.createSheet("results", 0);

        try {
            sheet.addCell(new Label(0, 0, "NUMBER OF PILE ELEMENTS"));
            sheet.addCell(new Label(0, 1, "PILE LENGTH (m)"));
            sheet.addCell(new Label(0, 2, "PILE EI (KN M²)"));
View Full Code Here

  {
    ArrayList<KeyString> idflist=new ArrayList<KeyString>();
   
    System.out.println("Saving "+file.getName());
    WritableWorkbook workbook = Workbook.createWorkbook(file);
    WritableSheet header = workbook.createSheet("Experimental setup", 0);
    addHeader(header,tests);
    if(summary.contains("all")||summary.contains("performance"))
    {
      System.out.println("Generating performance summary sheet");
      WritableSheet sheet = workbook.createSheet("Performance summary", workbook.getNumberOfSheets());
View Full Code Here

    WritableSheet header = workbook.createSheet("Experimental setup", 0);
    addHeader(header,tests);
    if(summary.contains("all")||summary.contains("performance"))
    {
      System.out.println("Generating performance summary sheet");
      WritableSheet sheet = workbook.createSheet("Performance summary", workbook.getNumberOfSheets());
      addPerformanceSheet(sheet,tests,time);
    }
    if(summary.contains("all")||summary.contains("disambiguation"))
    {
      System.out.println("Generating disambiguation summary sheet");
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.