A "lightweight" python script which converts XLS files to XLSX using Libre Office in headless mode. Other conversion types should be possible, but are not implemented (yet).
- Python 2.x or 3.x
- Libre Office
Tested on Ubuntu
To convert a set of XLS files to XLSX, run the script as such:
python LibreOfficeConverter.py **files
If no files are specified, the script will convert all files in the current working directory.
Simple usage in another python application (provided script is in path or same folder):
from LibreOfficeConverter import LibreOfficeConverter
converter = LibreOfficeConverter()
converter.to_xlsx()
Optional arguments:
verbose
Whether to print output from LibreOffice. Default value: Falsefiles
Files to convert. If empty list, convert all in cwd. Default value: []
Want to add other conversion options, arguments or features? Feel free to make a pull request!