Your First Aspose.Cells Application - Hello World
Contents
[
Hide
]
This tutorial shows how to create a very first application (Hello World) using Aspose.Cells' simple API. This simple application creates a Microsoft Excel file with the text ‘Hello World’ in a specified worksheet cell.
How to Create the Hello World Application
The steps below creates the Hello World application using the Aspose.Cells API:
- Create an instance of the Workbook class.
- If you have a license, then apply it. If you are using the evaluation version, skip the license related code lines.
- Create a new Excel file, or open an existing Excel file.
- Access any desired cell of a worksheet in the Excel file.
- Insert the words Hello World! into a cell accessed.
- Generate the modified Microsoft Excel file.
The implementation of the above steps is demonstrated in the examples below.
How to Create a New Workbook
The following example creates a new workbook from the scratch, writes Hello World! into cell A1 on the first worksheet and saves the Excel file.
How to Open an Existing File
The following example opens an existing Microsoft Excel template file named “Sample.xlsx”, inputs “Hello World!” text into the A1 cell in the first worksheet and saves the workbook.