Package com.aspose.cells

Examples of com.aspose.cells.Workbook.save()


        // Adding NSeries (chart data source) to the chart ranging from "A1" cell to "B3"
        SeriesCollection serieses = chart.getNSeries();
        serieses.add("A1:B3", true);

        // Saving the Excel file
        workbook.save("data/AsposeChart.xls");
       
        // Print message
        System.out.println("Workbook with chart is successfully created.");
  }
}
View Full Code Here


    // Setting the pivot chart data source
    chart.setPivotSource("PivotTable!PivotTable1");
    chart.setHidePivotFieldButtons(false);
   
    // Saving the Excel file
    workbook.save("data/Aspose_PivotChart.xls");
   
    // Print Message
    System.out.println("Pivot Chart created successfully.");
  }
}
View Full Code Here

    //Importing the contents of ArrayList to 1st row and first column vertically
    cells.importArrayList(list,2,0,true);
    //==================================================
   
    //Saving the Excel file
    workbook.save("data/AsposeDataImport.xls");
  }
}
View Full Code Here

   
    //Sort data in the specified data range (A2:C10)
    sorter.sort(cells, ca);

    //Saving the excel file
    workbook.save("data/AsposeSortedData.xls");
  }
}
View Full Code Here

  public static void main(String[] args) throws Exception
  {
    Workbook workbook = new Workbook("data/workbook.xls");
   
    //Save the document in PDF format
    workbook.save("data/AsposeConvert.pdf", SaveFormat.PDF);

        // Print message
        System.out.println("Excel to PDF conversion performed successfully.");
  }
}
View Full Code Here

    //Calculating the results of formulas
    book.calculateFormula();

    //Saving the Excel file
    book.save("data/AsposeFormulaEngine.xls");
  }
}
View Full Code Here

    //Apply subtotal, the consolidation function is Sum and it will applied to
    //Second column (C) in the list
    cells.subtotal(ca, 0, ConsolidationFunction.SUM, new int[] { 1 });
   
    //Save the excel file
    workbook.save("data/AsposeTotal.xls");
   
    // Print message
    System.out.println("Process completed successfully");
  }
}
View Full Code Here

      System.out.println((i+1) + ". [" + fcol +"," + frow +"] " + "[" + ecol +"," + erow +"]");
      worksheet.getCells().unMerge(frow, fcol, erow, ecol);
    }

    //Save the excel file
    workbook.save("data/AsposeMergeOutput.xls");
   
    // Print Message
    System.out.println("Detect Merge Cells successful.");
  }
}
View Full Code Here

        worksheet.autoFitRow(1); //Auto-fitting the 2nd row of the worksheet
        worksheet.autoFitColumn(0); //Auto-fitting the 1st column of the worksheet

        //Saving the modified Excel file in default (that is Excel 2003) format
        workbook.save("data/AutoFit_Aspose.xls");
       
        //Print message
        System.out.println("Row and Column auto fit successfully.");

  }
View Full Code Here

    //Setting the display format of the date
    Style style = cell.getStyle();
    style.setNumber(15);
    cell.setStyle(style);
   
    workbook.save("data/DataInCells_Aspose.xls"); //Saving the Excel file

// Print message
System.out.println("Data Added Successfully");
  }
}
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.