Giter Site home page Giter Site logo

clear-code / libreoffice-export-all-to-csv Goto Github PK

View Code? Open in Web Editor NEW
15.0 10.0 3.0 29 KB

Provides "Export All Sheets to CSV files" menu for LibreOffice/OpenOffice.org Calc

License: GNU General Public License v3.0

Makefile 16.17% Shell 83.83%

libreoffice-export-all-to-csv's Introduction

ExportAllToCsv

This is an addon for LibreOffice/OpenOffice.org Calc to export all worksheets of a spreadsheet to multiple CSV files.

Installation

Pre-built packages are also available at the releases page.

  1. Clone this repository to somewhere.
  2. Run make install.
  3. Then LibreOffice starts and shows a confirmation dialog for the installation. Click "OK".
  4. Restart LibreOffice.

Usage

Choose "Tools" => "Add-on" => "Export All Sheets to CSV files" menuitem, then worksheets will be exported as "(basename of the original file).(worksheet's name).csv" files.

Command line utilities

This repository includes command line tools ods2csv and odscat under the bin directory. You need to install them to any location manually, like:

$ install -C bin/ods2csv ~/local/bin/
$ install -C bin/odscat ~/local/bin/

Not only ods (OpenDocument Format: LibreOffice/OpenOffice.org), but xls and xlsx (Microsoft Excel) are also available as the input.

ods2csv

It converts given files to CSV files. All CSV files are placed to the working directory.

This is very similar to ssconvert (a part of Gnumeric). ssconvert -S input.ods output.%s.csv also converts all worksheets to separate CSV files with worksheet name. If you don't worry to install Gnumeric, try it also!

odscat

It converts given files to CSV and output all to the standard output. It will be useful to compare multiple ods files with the diff command.

Combination with Git

If you hope to show differenfe of ods or xls(x) files via git diff, odscat will help you.

  1. Register odscat as a filter. Put following configuration to your ~/.gitconfig:

    [diff "spreadsheet"]
            textconv = ~/local/bin/odscat
    
  2. Specify spreadheet filter for files with specific extensions. Put following configuration to your ~/.gitattributes:

    *.ods diff=spreadsheet
    *.xls diff=spreadsheet
    *.xlsx diff=spreadsheet
    

Then you'll see CSV diff for ods files via git diff.

libreoffice-export-all-to-csv's People

Contributors

piroor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libreoffice-export-all-to-csv's Issues

Change field separator in ods2csv

Hello, I know how to change this sperator for standard conversion:

soffice -convert-to csv:"Text - txt - csv (StarCalc)":59,34,0,1,1 -outdir "$PATH" "$FILE"

But how can I change this for ods2cvs?
I'l try to replacing this value in:

/usr/local/bin/libreoffice-export-all-to-csv-master/addon/ExportAllToCsv/Module.xba
and
/usr/local/bin/libreoffice-export-all-to-csv-master/ExportAllToCsv.oxt -> ExportAllToCsv/Module.xba

and still nothing change, is there any different way to do this?

Running the macro from the command line

Hello,

Thank you very much for the project.
I wonder how to run the macro from the command line.

soffice file.xls macro://?

What should be instead of question mark?
Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.