Package com.aspose.cells

Examples of com.aspose.cells.WorksheetCollection


  {
    //Instantiating a Workbook object
      Workbook workbook = new Workbook();

    //Adding a new worksheet to the Workbook object
    WorksheetCollection worksheets = workbook.getWorksheets();
    Worksheet worksheet = worksheets.add("My Worksheet");
   
    Cells cells = worksheet.getCells();

    //Adding some value to cell
    Cell cell = cells.get("A1");
View Full Code Here


  {
      // Instantiating a Workbook object
        Workbook workbook = new Workbook();

        // Obtaining the reference of the first worksheet
        WorksheetCollection worksheets = workbook.getWorksheets();
        Worksheet sheet = worksheets.get(0);

        // Adding some sample value to cells
        Cells cells = sheet.getCells();
        Cell cell = cells.get("A1");
        cell.setValue(50);
View Full Code Here

  {
    //Instantiating a Workbook object
    Workbook workbook = new Workbook();
   
    //Accessing the first worksheet in the Workbook file
    WorksheetCollection worksheets = workbook.getWorksheets();
    Worksheet sheet = worksheets.get(0);
   
    //Obtaining the reference of the PageSetup of the worksheet
    PageSetup pageSetup = sheet.getPageSetup();    
   
    //Defining column numbers A & B as title columns
View Full Code Here

  {
    //Instantiating a Workbook object
    Workbook workbook = new Workbook();
   
    //Accessing the first worksheet in the Workbook file
    WorksheetCollection worksheets = workbook.getWorksheets();
    Worksheet sheet = worksheets.get(0);
   
    //Obtaining the reference of the PageSetup of the worksheet
    PageSetup pageSetup = sheet.getPageSetup();    
   
    //Defining column numbers A & B as title columns
View Full Code Here

  {
      // Instantiating a Workbook object
        Workbook workbook = new Workbook();

        // Obtaining the reference of the first worksheet
        WorksheetCollection worksheets = workbook.getWorksheets();
        Worksheet sheet = worksheets.get(0);

        // Adding some sample value to cells
        Cells cells = sheet.getCells();
        Cell cell = cells.get("A1");
        cell.setValue(50);
View Full Code Here

  {
    //Create a new Workbook by excel file path
    Workbook wb = new Workbook();
   
    //Create a Worksheets object with reference to the sheets of the Workbook.
    WorksheetCollection sheets = wb.getWorksheets();
   
    //Copy data to a new sheet from an existing
    //sheet within the Workbook.
    sheets.addCopy("Sheet1");

    //Save the excel file.
    wb.save("data/AsposeCopyWorkbook.xls");
   
    System.out.println("Sheet copied successfully."); // Print Message
View Full Code Here

  public static void main(String[] args) throws Exception
  {
    //Create a new Workbook.
    Workbook workbook = new Workbook();

    WorksheetCollection worksheets = workbook.getWorksheets();
        Worksheet worksheet1 = worksheets.get(0);
        Worksheet worksheet2 = worksheets.add("Sheet2");
        Worksheet worksheet3 = worksheets.add("Sheet3");
       
    //Move Sheets with in Workbook.
        worksheet2.moveTo(0);
        worksheet1.moveTo(1);
        worksheet3.moveTo(2);
View Full Code Here

  {
    //Instantiating a Excel object by excel file path
    Workbook workbook = new Workbook();

    //Accessing the first worksheet in the Excel file
    WorksheetCollection worksheets = workbook.getWorksheets();
    Worksheet worksheet = worksheets.get(0);

    //Setting the zoom factor of the worksheet to 75    
    worksheet.setZoom(75);

    //Saving the modified Excel file in default format
View Full Code Here

  {
        //Instantiating a Workbook object
        Workbook workbook = new Workbook();

    //Adding a new worksheet to the Workbook object
    WorksheetCollection worksheets = workbook.getWorksheets();
    Worksheet worksheet = worksheets.add("My Worksheet");

    //Saving the Excel file
        workbook.save("data/newWorksheet_Aspose.xls");
       
        //Print Message
View Full Code Here

  {
    // Instantiating a Workbook object
    Workbook workbook = new Workbook();

    // Accessing the first worksheet in the Workbook file
    WorksheetCollection worksheets = workbook.getWorksheets();
    Worksheet sheet = worksheets.get(0);

    // Obtaining the reference of the PageSetup of the worksheet
    PageSetup pageSetup = sheet.getPageSetup();

    // Specifying the cells range (from A1 cell to F20 cell) of the print area
View Full Code Here

TOP

Related Classes of com.aspose.cells.WorksheetCollection

Copyright © 2018 www.massapicom. 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.