Skip to content

A "lightweight" python script which converts XLS files to XLSX using Libre Office in headless mode.

License

Notifications You must be signed in to change notification settings

jolny/LibreOfficeConverter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Libre Office Converter - convert XLS to XLSX with Python

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).

Prerequisites

  • Python 2.x or 3.x
  • Libre Office

Tested on Ubuntu

Usage

Quick stand-alone conversion

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.

Run from another Python app

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: False
  • files Files to convert. If empty list, convert all in cwd. Default value: []

Contributing

Want to add other conversion options, arguments or features? Feel free to make a pull request!

About

A "lightweight" python script which converts XLS files to XLSX using Libre Office in headless mode.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages