Beispiel #1
0
    /** @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent) */
    public void actionPerformed(ActionEvent arg0) {
      Batchable batch = (Batchable) batchSelectionList.getSelection();
      ExcelUtil excelUtil =
          new ExcelUtil(
              tableModel, "Avstemmingsrapport - " + batch.getFileName(), "Avstemmingsrapport");
      try {
        excelUtil.showDataInExcel(
            directory + "/" + applUser.getUserName() + "/",
            "Avstemming.xls",
            (List<Integer>) null,
            (List<Integer>) null,
            (JLabel) null);

        GuiUtil.showMsgFrame(
            window.getComponent(),
            "Excefil",
            "Dersom ikke excel starter automatisk, ligger excelfil med navn Avstemming.xls"
                + " under katalog "
                + directory
                + "/"
                + applUser.getUserName()
                + "/");
      } catch (FrafException e) {
        e.printStackTrace();
        GuiUtil.showErrorMsgDialog(window.getComponent(), "Feil", e.getMessage());
      }
    }
Beispiel #2
0
  /**
   * @see no.ica.fraf.gui.model.interfaces.Threadable#doWork(java.lang.Object[], javax.swing.JLabel)
   */
  public Object doWork(Object[] params, JLabel labelInfo) {
    try {
      final ExcelUtil excelUtil = new ExcelUtil(getExcelTableModel(), "", "Sheet1");
      final String dir = excelUtil.prepare(currentApplUser, departmentFrame);

      excelUtil.showDataInExcel(dir, "tmp.xls", getSumColumns(), getNumberCols(), labelInfo);
    } catch (FrafException e) {
      GuiUtil.showErrorMsgFrame(departmentFrame, "Feil", e.getMessage());
      e.printStackTrace();
    }
    return new Boolean(true);
  }