A modern, free web tool to convert Excel files (.xls, .xlsx) to PDF format using LibreOffice headless mode.
- ✅ Convert Excel files (.xlsx, .xls) to PDF
- ✅ LibreOffice ONLY - No other conversion dependencies
- ✅ Beautiful Bootstrap 5 UI with modern design
- ✅ Drag & drop file upload
- ✅ Progress bar with real-time updates
- ✅ Secure file handling with automatic cleanup
- ✅ Docker containerization
- ✅ Ready for Render.com and Railway.app deployment
- ✅ File size validation (50MB limit)
- ✅ Responsive design
# Build and run
docker-compose up --build
# Access at http://localhost:5000Prerequisites:
- Python 3.11+
- LibreOffice installed
# Install dependencies
pip install -r requirements.txt
# Run the application
python app.py
# Access at http://localhost:5000Convert an uploaded Excel file to PDF.
Request:
- Method: POST
- Content-Type: multipart/form-data
- Body: Excel file (field name:
file)
Response:
- Success: PDF file download
- Error: JSON error message
Example using curl:
curl -X POST -F "file=@example.xlsx" http://localhost:5000/convert -o output.pdfHealth check endpoint.
Response:
{
"status": "OK",
"service": "Excel to PDF Converter",
"libreoffice_available": true,
"timestamp": "2024-01-01T00:00:00.000000"
}Get service information and capabilities.
- Connect your Git repository
- Render will automatically detect the Dockerfile
- The service will be deployed using Docker
- LibreOffice will be available in the container
- Connect your Git repository
- Select Dockerfile as the build method
- Deploy automatically
excel-to-pdf/
├── app.py # Flask backend
├── requirements.txt # Python dependencies
├── Dockerfile # Docker configuration
├── docker-compose.yml # Docker Compose for development
├── README.md # This file
├── templates/
│ └── index.html # Frontend HTML
└── static/
├── css/
│ └── style.css # Custom styles
└── js/
└── script.js # Frontend JavaScript
- Invalid file format: "Please upload a valid Excel file (.xls or .xlsx)."
- File too large: "File size must be less than 50MB."
- Conversion failure: "Failed to convert file. Please try again."
- File type validation
- File size limits (50MB)
- Secure filename handling
- Temporary file cleanup
- Non-root user in Docker container
MIT License
For issues and questions, please check the logs or create an issue in the repository.