Product Page | Docs | API Reference | Demos | Blog | Code Samples | Free Support | Temporary License | EULA
Try our free online apps demonstrating some of the most popular Aspose.Cells functionality.
A powerful library for manipulating and converting Excel (XLS, XLSX, XLSB), CSV, ODS, PDF, JSON, JPG, PNG, BMP, SVG, EMF and HTML files.
Aspsoe.Cells API Features
Aspose.Cells offers a wide arrange of features for creating, reading, manipulating and saving Excel® files:
Spreadsheet generation & manipulation via API.
High-quality file format conversion & rendering.
Print Microsoft Excel® files to physical or virtual printers.
Combine, modify, protect, or parse Excel® sheets.
Apply worksheet formatting.
Configure and apply page setup for the worksheets.
Create & customize Excel® charts, Pivot Tables, conditional formatting rules, slicers, tables & spark-lines.
Convert Excel® charts to images & PDF.
Convert Excel® files to various other formats.
Formula calculation engine that supports all basic and advanced Excel functions.
Supported Read & Write Formats
Microsoft Excel®: XLS, XLSX, XLSB, XLSM, XLT, XLTX, XLTM, SpreadsheetML
OpenOffice: ODS, SXC, FODS
Text: JSON, TXT, CSV, TSV, Tab-Delimited
Web: HTML, MHTML
iWork®: Numbers
Save Excel® Files As
Microsoft Word®: DOCX
Microsoft PowerPoint®: PPTX
Microsoft Excel®: XLAM
Fixed Layout: PDF, XPS
Text: JSON, TXT, CSV, TSV, Tab-Delimited, XML
Image: TIFF, PNG, BMP, JPEG, GIF, SVG
Metafile: EMF
Markdown: MD
Create Excel File from scratch using Python
# import the python package
import aspose.cells
from aspose.cells import License, Workbook, FileFormatType
# Create a new Workbook
workbook = Workbook()
# Get the first worksheet
worksheet = workbook.worksheets[0]
# Get the "A1" cell
cells = worksheet.cells
cell = cells.get("A1")
# Write "Hello World" to "A1" in the first sheet
cell.put_value("Hello World!")
# save this workbook to XLSX
workbook.save("HelloWorld.xlsx")
Convert Excel XLSX File to PDF using Python
# import the python package
import aspose.cells
from aspose.cells import License, Workbook, FileFormatType
workbook = Workbook("HelloWorld.xlsx")
# save this workbook to resultFile,you can see a chart while open the file with MS-Excel*/
workbook.save("Convert.pdf");
Creating a Simple Pivot Table Using Aspose.Cells
from aspose.cells import Workbook
from aspose.cells.pivot import PivotFieldType
# Instantiating a Workbook object
workbook = Workbook()
# Obtaining the reference of the newly added worksheet
sheet = workbook.worksheets[0]
cells = sheet.cells
# Setting the value to the cells
cell = cells.get("A1")
cell.put_value("Sport")
cell = cells.get("B1")
cell.put_value("Quarter")
cell = cells.get("C1")
cell.put_value("Sales")
cell = cells.get("A2")
cell.put_value("Golf")
cell = cells.get("A3")
cell.put_value("Golf")
cell = cells.get("A4")
cell.put_value("Tennis")
cell = cells.get("A5")
cell.put_value("Tennis")
cell = cells.get("A6")
cell.put_value("Tennis")
cell = cells.get("A7")
cell.put_value("Tennis")
cell = cells.get("A8")
cell.put_value("Golf")
cell = cells.get("B2")
cell.put_value("Qtr3")
cell = cells.get("B3")
cell.put_value("Qtr4")
cell = cells.get("B4")
cell.put_value("Qtr3")
cell = cells.get("B5")
cell.put_value("Qtr4")
cell = cells.get("B6")
cell.put_value("Qtr3")
cell = cells.get("B7")
cell.put_value("Qtr4")
cell = cells.get("B8")
cell.put_value("Qtr3")
cell = cells.get("C2")
cell.put_value(1500)
cell = cells.get("C3")
cell.put_value(2000)
cell = cells.get("C4")
cell.put_value(600)
cell = cells.get("C5")
cell.put_value(1500)
cell = cells.get("C6")
cell.put_value(4070)
cell = cells.get("C7")
cell.put_value(5000)
cell = cells.get("C8")
cell.put_value(6430)
pivotTables = sheet.pivot_tables
# Adding a PivotTable to the worksheet
index = pivotTables.add("=A1:C8", "E3", "PivotTable2")
# Accessing the instance of the newly added PivotTable
pivotTable = pivotTables[index]
# Unshowing grand totals for rows.
pivotTable.row_grand = False
# Draging the first field to the row area.
pivotTable.add_field_to_area(PivotFieldType.ROW, 0)
# Draging the second field to the column area.
pivotTable.add_field_to_area(PivotFieldType.COLUMN, 1)
# Draging the third field to the data area.
pivotTable.add_field_to_area(PivotFieldType.DATA, 2)
# Saving the Excel file
workbook.save("pivotTable_test_out.xls")
Convert Excel Workbook to JSON
from aspose.cells import Workbook
# Instantiating a Workbook object
workbook = Workbook()
# Obtaining the reference of the newly added worksheet
sheet = workbook.worksheets[0]
cells = sheet.cells
# Setting the value to the cells
cell = cells.get("A1")
cell.put_value("First name")
cell = cells.get("A2")
cell.put_value("Simon")
cell = cells.get("A3")
cell.put_value("Kevin")
cell = cells.get("A4")
cell.put_value("Leo")
cell = cells.get("A5")
cell.put_value("Johnson")
cell = cells.get("B1")
cell.put_value("Age")
cell = cells.get("C1")
cell.put_value("Value")
cell = cells.get("B2")
cell.put_value(32)
cell = cells.get("B3")
cell.put_value(33)
cell = cells.get("B4")
cell.put_value(34)
cell = cells.get("B5")
cell.put_value(35)
cell = cells.get("C2")
cell.put_value(123.546)
cell = cells.get("C3")
cell.put_value(56.78)
cell = cells.get("C4")
cell.put_value(34)
cell = cells.get("C5")
cell.put_value(9)
# Saving the Excel file to json
workbook.save("Out.json")
Product Page | Docs | API Reference | Demos | Blog | Free Support | Temporary License | EULA
Release files for aspose-cells-python 24.8.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| aspose_cells_python-24.8.0-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| aspose_cells_python-24.8.0-py3-none-win32.whl | Python 3 | none | Windows x86-32 | Details |
| aspose_cells_python-24.8.0-py3-none-manylinux1_x86_64.whl | Python 3 | none | Linux glibc 2.5+ x86-64 | Details |
| aspose_cells_python-24.8.0-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details |
| aspose_cells_python-24.8.0-py3-none-macosx_10_14_x86_64.whl | Python 3 | none | macOS 10.14+ x86-64 | Details |
Total release size: 313.2 MB
Release files / aspose_cells_python-24.8.0-py3-none-win_amd64.whl
| Download URL | aspose_cells_python-24.8.0-py3-none-win_amd64.whl |
|---|---|
| Size | 55.7 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
709fa80c3d8f73010294bfcf7f40d0fa606eaf5fc40d568e254aeae6f9ea7ada
|
|
BLAKE2b-256 checksum How to use checksums |
0143f9e4e797a2be6a5a529cacb600cccf49f0feb759c1f7fd60956c27cabde4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.10.2
|
Release files / aspose_cells_python-24.8.0-py3-none-win32.whl
| Download URL | aspose_cells_python-24.8.0-py3-none-win32.whl |
|---|---|
| Size | 48.0 MB |
| Tags | Python 3 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
1eca21074e467d67bd141228934580265b6ee335f6c8e205f509a002d03efd12
|
|
BLAKE2b-256 checksum How to use checksums |
e118fe3ca81a538ca87c73359cb60546eba2c1354e441a1b94d4adfec5b80e29
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.10.2
|
Release files / aspose_cells_python-24.8.0-py3-none-manylinux1_x86_64.whl
| Download URL | aspose_cells_python-24.8.0-py3-none-manylinux1_x86_64.whl |
|---|---|
| Size | 77.3 MB |
| Tags | Linux glibc 2.5+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
4f0a7e535e722df519f386e3be694dacc871cf9a7547adf28b29e4004b01f806
|
|
BLAKE2b-256 checksum How to use checksums |
7fc8e888ae129f8571af607d38249f8b990205f417a3bb4235730c6656a9480e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.10.2
|
Release files / aspose_cells_python-24.8.0-py3-none-macosx_11_0_arm64.whl
| Download URL | aspose_cells_python-24.8.0-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 56.3 MB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
4527a47303f6547c8da9ef5ea37e1a1ba696df7b3cf252f2938239bf21068864
|
|
BLAKE2b-256 checksum How to use checksums |
43588e92579b9eea61689843d9284d333360fea9b286c0cad03d409e76808951
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.10.2
|
Release files / aspose_cells_python-24.8.0-py3-none-macosx_10_14_x86_64.whl
| Download URL | aspose_cells_python-24.8.0-py3-none-macosx_10_14_x86_64.whl |
|---|---|
| Size | 75.9 MB |
| Tags | Python 3 macOS 10.14+ x86-64 |
|
SHA-256 checksum How to use checksums |
d819161b71865f8dcd91a90254692b0b2923b9a2b8abc01df7e8d5e609f22c9e
|
|
BLAKE2b-256 checksum How to use checksums |
3162938034912bf47f612a2014785db1abc51829cea0cc6ed781c1a980bd8460
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.10.2
|