A powerful and flexible API that provides advanced functionality for working with Excel files.
163
Process Excel files through a simple HTTP API — no Excel install, no desktop automation, no client-side coding.
Upload a workbook, queue formatting and processing operations, download the result. Built on ASP.NET Core and EPPlus, packaged as a single self-contained container you can run anywhere Docker runs.
| API-first Excel | Integrate spreadsheet processing into backends, scripts, and RPA without Office on the server |
| Zero client setup | Callers only need HTTP + an API key |
| Operation pipeline | Chain cell styling (font, fill, border, alignment, merge, column/row sizing) — more operations coming |
| Secure by default | API-key authentication on every protected route |
| Production-ready container | Non-root user, health endpoint, SQLite persistence, background job worker |
| Fully configurable | Auth, storage, sessions, workers, and EPPlus license via environment variables |
docker run -d \
--name exceltools \
-p 8080:8080 \
-e Auth__ApiKeys__0="change-me-to-a-strong-secret" \
-e EPPlus__ExcelPackage__License="NonCommercialPersonal:YourName" \
-v exceltools-data:/app/Storages \
YOUR_DOCKERHUB_USER/exceltools:latest
Replace YOUR_DOCKERHUB_USER/exceltools with your published image name.
Health check:
curl http://localhost:8080/health
Send every API request with:
x-api-key: change-me-to-a-strong-secret
POST /api/Session (multipart/form-data, field file, .xlsx)POST /api/ExcelProcess/process with sessionId, worksheet name, and operationsGET /api/ExcelProcess/{processId} or GET /api/Session/{sessionId}GET /api/Session/{sessionId}/download when status is CompletedExample styling request:
{
"sessionId": "<from-upload>",
"worksheet": "Sheet1",
"operations": [
{
"targetType": "Cell",
"target": "A1:C1",
"operationType": "Styling",
"parameters": {
"font": { "bold": true, "color": "#FFFFFF" },
"fill": { "backgroundColor": "#1F4E79" },
"alignment": { "horizontal": "Center", "vertical": "Center" }
}
}
]
}
| Item | Default | Notes |
|---|---|---|
| HTTP port | 8080 | Mapped with -p 8080:8080 |
| Data volume | /app/Storages | SQLite DB + uploaded/processed files — mount a volume for persistence |
Without a volume, all sessions and files are lost when the container is removed.
ASP.NET Core maps nested settings with __ (double underscore). Array items use __0, __1, …
| Variable | Description | Example |
|---|---|---|
Auth__ApiKeys__0 | At least one API key. Container will not start if no keys are configured. | Auth__ApiKeys__0=my-secret-key |
Add more keys with Auth__ApiKeys__1, Auth__ApiKeys__2, …
| Variable | Description | Example |
|---|---|---|
Auth__ApiKeys__1 | Additional accepted API key | Auth__ApiKeys__1=second-key |
Clients must send the key in header: x-api-key: <value>
| Variable | Description | Default (image) | Example |
|---|---|---|---|
EPPlus__ExcelPackage__License | EPPlus license string for your use case. Override the baked-in value for your org / commercial license. See EPPlus licensing. | Value from image appsettings.json | NonCommercialPersonal:YourName or your commercial license string |
ASPNETCORE_ENVIRONMENT | Hosting environment | Production (typical in containers) | Production |
ASPNETCORE_URLS | Listen URLs (optional if using port env vars) | Kestrel default in image | http://+:8080 |
ASPNETCORE_HTTP_PORTS | HTTP ports Kestrel binds | 8080 (common for this image) | 8080 |
| Variable | Required | Default | Description |
|---|---|---|---|
Auth__ApiKeys__0 | Yes | (empty — startup fails) | First API key |
Auth__ApiKeys__N | No | — | Additional keys (N = 1, 2, …) |
| Variable | Required | Default | Description |
|---|---|---|---|
Storage__RootPath | No | Storages | Root folder for DB + files (relative to app, or absolute path). Prefer mounting /app/Storages. |
Storage__DatabaseRelativePath | No | Databases/exceltools.db | SQLite file path under root |
Storage__FilesRelativePath | No | Files | Uploaded/processed files folder under root |
Storage__MaxUploadBytes | No | 99614720 (~95 MB) | Max upload size in bytes (also applied to multipart form limit) |
Storage__OriginalFileNamePrefix | No | original_ | Prefix for stored original files |
Storage__ProcessedFileNamePrefix | No | processed_ | Prefix for processed files |
ConnectionStrings__Default | No | Data Source=Storages/Databases/exceltools.db | SQLite connection string. If unset, derived from storage paths. |
Persistence tip: mount a volume on /app/Storages (or set Storage__RootPath to your mount point) so the database and files survive restarts.
| Variable | Required | Default | Description |
|---|---|---|---|
Session__Ttl | No | 1.00:00:00 (24 hours) | How long a session lives before cleanup (TimeSpan) |
Session__CleanupInterval | No | 00:15:00 | How often expired sessions/files are cleaned (TimeSpan) |
TimeSpan formats: d.hh:mm:ss or hh:mm:ss (e.g. 12:00:00 = 12 hours, 00:30:00 = 30 minutes).
| Variable | Required | Default | Description |
|---|---|---|---|
Processing__WorkerCapacity | No | 1 | Job-queue worker capacity (minimum effective value is 1) |
Processing__MaxProcessingTime | No | 00:15:00 | Max processing time setting (TimeSpan) |
Processing__AllowedFileExtensions__0 | No | .xlsx | Allowed upload extension (index 0) |
Processing__AllowedFileExtensions__N | No | — | Additional extensions if you expand support later |
To replace the default extension list via env, set the indices you need, for example:
-e Processing__AllowedFileExtensions__0=".xlsx"
| Variable | Required | Default | Description |
|---|---|---|---|
Logging__LogLevel__Default | No | Information | Default log level |
Logging__LogLevel__Microsoft.AspNetCore | No | Warning | ASP.NET Core framework log level |
AllowedHosts | No | * | Host filtering allow-list |
docker run)docker run -d \
--name exceltools \
--restart unless-stopped \
-p 8080:8080 \
-e ASPNETCORE_ENVIRONMENT=Production \
-e ASPNETCORE_HTTP_PORTS=8080 \
-e Auth__ApiKeys__0="prod-key-alpha" \
-e Auth__ApiKeys__1="prod-key-beta" \
-e EPPlus__ExcelPackage__License="NonCommercialPersonal:YourName" \
-e Storage__RootPath="/app/Storages" \
-e Storage__MaxUploadBytes=99614720 \
-e Session__Ttl="1.00:00:00" \
-e Session__CleanupInterval="00:15:00" \
-e Processing__WorkerCapacity=1 \
-e Processing__MaxProcessingTime="00:15:00" \
-e Processing__AllowedFileExtensions__0=".xlsx" \
-e Logging__LogLevel__Default=Information \
-v exceltools-data:/app/Storages \
YOUR_DOCKERHUB_USER/exceltools:latest
services:
exceltools:
image: YOUR_DOCKERHUB_USER/exceltools:latest
container_name: exceltools
restart: unless-stopped
ports:
- "8080:8080"
environment:
ASPNETCORE_ENVIRONMENT: Production
ASPNETCORE_HTTP_PORTS: "8080"
Auth__ApiKeys__0: "${EXCELTOOLS_API_KEY}"
EPPlus__ExcelPackage__License: "${EPPLUS_LICENSE}"
Storage__RootPath: /app/Storages
Storage__MaxUploadBytes: "99614720"
Session__Ttl: "1.00:00:00"
Session__CleanupInterval: "00:15:00"
Processing__WorkerCapacity: "1"
Processing__MaxProcessingTime: "00:15:00"
Processing__AllowedFileExtensions__0: ".xlsx"
Logging__LogLevel__Default: Information
volumes:
- exceltools-data:/app/Storages
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
volumes:
exceltools-data:
Create a .env next to compose (do not commit secrets):
EXCELTOOLS_API_KEY=change-me-to-a-strong-secret
EPPLUS_LICENSE=NonCommercialPersonal:YourName
| Method | Path | Auth | Purpose |
|---|---|---|---|
GET | /health | No | Liveness |
POST | /api/Session | Yes | Upload .xlsx |
GET | /api/Session/{sessionId} | Yes | Session status |
GET | /api/Session/{sessionId}/download | Yes | Download processed file (when Completed) |
GET | /api/Session/{sessionId}/download-always | Yes | Download processed if present, else original |
POST | /api/ExcelProcess/process | Yes | Enqueue operations |
GET | /api/ExcelProcess/{processId} | Yes | Process status |
Optional upload header: x-request-by: <caller-id>
More Excel operations are planned for future image tags.
Auth__ApiKeys__* as secrets — use Docker secrets, Compose .env, or your orchestrator’s secret store| Symptom | What to check |
|---|---|
| Container exits immediately | Auth__ApiKeys__0 missing or empty |
401 / unauthorized | Header x-api-key must match a configured key |
| Upload rejected | File empty, wrong extension, or over Storage__MaxUploadBytes |
Download 409 | Session not Completed yet — poll status |
| Data lost after recreate | Mount a volume on /app/Storages |
| EPPlus license errors | Set EPPlus__ExcelPackage__License to a valid license string |
Application usage depends on your deployment terms. EPPlus requires a valid license configuration via EPPlus__ExcelPackage__License. Review EPPlus License Overview before commercial use.
Content type
Image
Digest
sha256:0d6292c3d…
Size
112.7 MB
Last updated
5 days ago
docker pull tuitentuan/excel-tools:v1.2.1.1