A 100% standalone Excel Python API for Processing Excel Files
Project description
A Free Python Excel API to Process Excel Spreadsheets
Product Page | Documentation | Examples | Forum | Customized Demo
Free Spire.XLS for Python is a free Python Excel API that can be used to create, read, write, and convert Excel spreadsheets in any type of Python applications without installing Microsoft Office.
Free Spire.XLS for Python provides a comprehensive set of interfaces that allow for the manipulation of Excel files with ease. By utilizing it, developers can automate spreadsheet-related tasks, streamline data analysis, and build applications that interact seamlessly with Excel documents.
Excel Spreadsheets Processing & Security Features
-
Add worksheets, copy worksheets, or rename worksheets
-
Remove conditional formatting from Excel
-
Hide or show Excel comments
Compatible with: old Excel 97-2003 format (.xls), Excel 2007, Excel 2010, Excel 2013, Excel 2016 and Excel 2019 (.xlsx, .xlsb, .xlsm), and Open Office(.ods) format.
High Quality Excel File Conversion
- Convert Excel (XLS or XLSX) to PDF
- Conversion between Excel and HTML
- Convert Excel to Images (PNG, JPG or BMP)
- Conversion between Excel and CSV
- Convert Excel to XML
- Convert Excel to TXT
- Convert CSV to PDF
- Convert Excel to SVG
- Convert Excel to XPS
- Convert XLS to XLSM
- Conversion between XLS and XLSX
- Convert Excel to ODS (OpenDocument Spreadsheet)
- Convert Excel charts to Images
Advanced Cell Manipulation & Calculation Engine
- Merge or unmerge Excel cells
- Wrap or unwrap text in Excel Cells
- Align text in Excel cells
- Add or remove cell borders in Excel
- Set fonts in Excel cells (including font size, color, bold, italic, underlining, etc.)
- Set fill color, gradient or pattern for Excel cells
- Find & replace data in Excel cells
- Add or read Excel formulas
- Calculate Excel formulas
- Remove Excel formulas
- Create, edit or delete named ranges in Excel
Excel Charts, Images, Shapes and Other Elements
- Create pie charts in Excel
- Create column charts in Excel
- Create bar charts in Excel
- Create line charts in Excel
- Create radar charts in Excel
- Insert or delete pictures in Excel
- Compress, resize, or move images in Excel
- Replace or extract images in Excel
- Insert or remove shapes in Excel
- Create or operate pivot tables in Excel
- Add, update, or delete textboxes in Excel
- Insert hyperlinks in Excel
- Update or remove hyperlinks in Excel
- Add header & footer in Excel
- Add watermarks in Excel
Examples
Create an Excel File in Python
from spire.xls.common import *
from spire.xls import *
outputFile = "CreateAnExcelWithFiveSheet.xlsx"
# Create an object of Workbook class
workbook = Workbook()
# Add five sheets to this file
workbook.CreateEmptySheets(5)
# Loop through the added worksheets
for i in range(0, 5):
sheet = workbook.Worksheets[i]
sheet.Name = "Sheet" + str(i)
# Add text to cells
for row in range(1, 151):
for col in range(1, 51):
sheet.Range[row,col].Text = "row" + str(row) + " col" + str(col)
# Save the Excel file
workbook.SaveToFile(outputFile, ExcelVersion.Version2016)
workbook.Dispose()
Convert Excel to PDF in Python
from spire.xls import *
from spire.xls.common import *
inputFile = "Input.xlsx"
outputFile = "ExcelToPDF.pdf"
# Create a Workbook object
workbook = Workbook()
# Load an Excel document
workbook.LoadFromFile(inputFile)
# Set worksheet to fit to page when converting
workbook.ConverterSetting.SheetFitToPage = True
# Convert the Excel file to PDF
workbook.SaveToFile(outputFile, FileFormat.PDF)
workbook.Dispose()
Convert Excel to Image in Python
from spire.xls import *
from spire.xls.common import *
# Create a Workbook object
workbook = Workbook()
# Load an Excel file
workbook.LoadFromFile("Sample.xlsx")
# Get the first worksheet
sheet = workbook.Worksheets[0]
# Save the worksheet to an image
image = sheet.ToImage(sheet.FirstRow, sheet.FirstColumn, sheet.LastRow, sheet.LastColumn)
# Save the image to a PNG file
image.Save("SheetToImage.png")
workbook.Dispose()
Product Page | Documentation | Examples | Forum | Customized Demo
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file Spire.Xls.Free-14.12.4-py3-none-win_amd64.whl.
File metadata
- Download URL: Spire.Xls.Free-14.12.4-py3-none-win_amd64.whl
- Upload date:
- Size: 24.7 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
859378fcfeabc8aa518bee81fbfc137e32c6efa0f8831041b59f26db29cec43d
|
|
| MD5 |
ad834cdacf0b86fd717d6aa8d6cecf6c
|
|
| BLAKE2b-256 |
40502cd7562dabb78ea5b08e5849284851cca82ed7de160a762aac933024658f
|
File details
Details for the file Spire.Xls.Free-14.12.4-py3-none-manylinux1_x86_64.whl.
File metadata
- Download URL: Spire.Xls.Free-14.12.4-py3-none-manylinux1_x86_64.whl
- Upload date:
- Size: 37.9 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
40668246336eb8b70597446fc8103fd1bf7e3f770356a76496c9b2e6ebdbdae9
|
|
| MD5 |
35d03af11e5ada23b560136d9505ae59
|
|
| BLAKE2b-256 |
4951c1ec4f03c5eab258cad1ee7ebeb9ab88b568e78a8b5602029aeeb8ecd094
|
File details
Details for the file Spire.Xls.Free-14.12.4-py3-none-macosx_10_7_universal.whl.
File metadata
- Download URL: Spire.Xls.Free-14.12.4-py3-none-macosx_10_7_universal.whl
- Upload date:
- Size: 47.0 MB
- Tags: Python 3, macOS 10.7+ universal (x86-64, i386, PPC64, PPC)
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e75c22b140c5686fe7a4fb6287b7a1488c2b4951529da7e2bf5574513e7dd550
|
|
| MD5 |
b74295ff920ea2e24b34b020061e548f
|
|
| BLAKE2b-256 |
02a2f2c20ed93dce0a2275bf0645554df9d39c005c0b03376e0ef03bc233f2ba
|