Package com.aspose.cells

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


  {
    //Creating an Workbook object with an Excel file path
    Workbook workbook = new Workbook("data/xlsx4j/pivot.xlsm");
   
    //Saving the Excel file
      workbook.save("data/xlsx4j/pivot-rtt-Aspose.xlsm");
     
      //Print Message
      System.out.println("Worksheet saved successfully.");
  }
}
View Full Code Here


    //Adding some value to cell
    Cell cell = cells.get("A1");
    cell.setValue("This is Aspose test of fonts!");

    //Saving the Excel file
      workbook.save("data/xlsx4j/newWorksheet_Aspose.xls");
     
      //Print Message
      System.out.println("Sheet added successfully.");
  }
}
View Full Code Here

    //are 5 in the worksheet. It is "F6" cell
    int pictureIndex = sheet.getPictures().add(5,5,"data/xlsx4j/greentick.png");
    Picture picture = sheet.getPictures().get(pictureIndex);

    //Saving the Excel file
    workbook.save("data/xlsx4j/AddImage-Aspose.xlsx",SaveFormat.XLSX);
   
    //Print Message
      System.out.println("Image added successfully.");
  }
}
View Full Code Here

   
    //Setting the height of the second row to 40
    cells.setRowHeight(1, 40);

    //Saving the modified Excel file in default (that is Excel 2003) format
    workbook.save(System.getProperty("user.dir") + "/data/xlsx4j/RowHeight-Aspose.xlsx");
   
    //Print Message
      System.out.println("Worksheet saved successfully.");
  }
}
View Full Code Here

        // 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

    //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

    //Setting the width of the font to 2
    comment.setWidthCM(2);

    //Saving the Excel file
    workbook.save("data/xlsx4j/AddComments-Aspose.xlsx", SaveFormat.XLSX);
   
    //Print Message
      System.out.println("Comment added successfully.");
  }
}
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

   
    //Defining row numbers 1 & 2 as title rows
    pageSetup.setPrintTitleRows("$1:$2");
   
    // Workbooks can be saved in many formats
    workbook.save("data/AsposePrintTitles.xlsx", FileFormatType.XLSX);

    System.out.println("Print Titles Set successfully."); // Print Message
  }
}
View Full Code Here

   
    //Defining row numbers 1 & 2 as title rows
    pageSetup.setPrintTitleRows("$1:$2");
   
    // Workbooks can be saved in many formats
    workbook.save("data/AsposePrintTitles.xlsx", FileFormatType.XLSX);

    System.out.println("Print Titles Set successfully."); // Print Message
  }
}
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.