Skip to main content

A Free Python Excel API to Process Excel Spreadsheets

Foo

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

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

Advanced Cell Manipulation & Calculation Engine

Excel Charts, Images, Shapes and Other Elements

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

Metadata

Release files for Spire.Xls.Free 14.12.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for Spire.Xls.Free 14.12.4
File Interpreter ABI Platform
Spire.Xls.Free-14.12.4-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
Spire.Xls.Free-14.12.4-py3-none-manylinux1_x86_64.whl Python 3 none Linux glibc 2.5+ x86-64 Details
Spire.Xls.Free-14.12.4-py3-none-macosx_10_7_universal.whl Python 3 none macOS 10.7+ universal (x86-64, i386, PPC64, PPC) Details

Total release size: 109.6 MB

Release files / Spire.Xls.Free-14.12.4-py3-none-win_amd64.whl

Download URL Spire.Xls.Free-14.12.4-py3-none-win_amd64.whl
Size 24.7 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
859378fcfeabc8aa518bee81fbfc137e32c6efa0f8831041b59f26db29cec43d
BLAKE2b-256 checksum
How to use checksums
40502cd7562dabb78ea5b08e5849284851cca82ed7de160a762aac933024658f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.11

Release files / Spire.Xls.Free-14.12.4-py3-none-manylinux1_x86_64.whl

Download URL Spire.Xls.Free-14.12.4-py3-none-manylinux1_x86_64.whl
Size 37.9 MB
Tags Linux glibc 2.5+ x86-64 Python 3
SHA-256 checksum
How to use checksums
40668246336eb8b70597446fc8103fd1bf7e3f770356a76496c9b2e6ebdbdae9
BLAKE2b-256 checksum
How to use checksums
4951c1ec4f03c5eab258cad1ee7ebeb9ab88b568e78a8b5602029aeeb8ecd094
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.11

Release files / Spire.Xls.Free-14.12.4-py3-none-macosx_10_7_universal.whl

Download URL Spire.Xls.Free-14.12.4-py3-none-macosx_10_7_universal.whl
Size 47.0 MB
Tags Python 3 macOS 10.7+ universal (x86-64, i386, PPC64, PPC)
SHA-256 checksum
How to use checksums
e75c22b140c5686fe7a4fb6287b7a1488c2b4951529da7e2bf5574513e7dd550
BLAKE2b-256 checksum
How to use checksums
02a2f2c20ed93dce0a2275bf0645554df9d39c005c0b03376e0ef03bc233f2ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.11

Release history Release notifications | RSS feed

This release

14.12.4 This release

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page