Language

Create spreadsheets & documents with Python

You can create a fully-formatted, shareable spreadsheet from Python in a single HTTP request — no Google API setup, OAuth, or client library. POST your rows to the OpenOfficeAI API and get back a URL anyone can open and edit in the browser. Below is a complete, runnable example using the requests library.

Python (requests)
import requests

resp = requests.post(
    "https://openofficeai.com/api/v1/sheets",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={
        "title": "Q3 Revenue",
        "sheets": [{
            "name": "Revenue",
            "rows": [
                ["Month", "Revenue", "Growth"],
                ["July", 48200, "+12%"],
                ["August", 61900, "+28%"],
            ],
        }],
    },
)

data = resp.json()
print(data["url"])  # https://openofficeai.com/s/...

How to create a spreadsheet with Python

  1. 1Sign up and copy your API key from the dashboard (the free tier includes 500 calls/month).
  2. 2POST a JSON body with a title and sheets[].rows to https://openofficeai.com/api/v1/sheets with your Bearer key.
  3. 3Read the url field from the JSON response — that is your shareable, editable spreadsheet link.
  4. 4Need a file instead? GET /api/v1/download/{id}?format=xlsx (or pdf, csv) to download it.

Why use OpenOfficeAI with Python

Frequently asked questions

Do I need the Google Sheets API or pandas to use this?

No. You only need the requests library (or urllib). You send rows as JSON and OpenOfficeAI builds the spreadsheet for you, so there is no Google Cloud project, service account, or pandas/openpyxl dependency to manage.

How do I add formulas or formatting from Python?

Instead of plain rows, send a cells object per sheet, e.g. {"A1": {"value": "Total", "bold": true}, "B1": {"formula": "=SUM(B2:B10)"}}. The API applies bold, colors, font size, and Excel-style formulas at creation time.

Can I update a spreadsheet I already created?

Yes. GET /api/v1/sheets/{id} to read the current data, modify it in Python, then PUT /api/v1/sheets/{id} with the updated data to replace it. The URL stays the same so any shared link keeps working.

Start creating documents with Python

Free tier includes 500 API calls per month — no card required.

Related integrations