CSV2ODS(1)

🌸 CSV2ODS(1) β€” csv2ods 🌸

okay bestie, welcome to the csv2ods page, it's a User commands moment and honestly? it eats. it lives in section 1 of the manual, aka the "girlies who run things in the shell" section. let's get into it πŸ’…


✨ NAME ✨

csv2ods β€” creates an OpenDocument spreadsheet out of comma separated values. like, it takes your sad lil CSV and gives it a whole glow-up into a real spreadsheet. iconic behavior fr πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

csv2ods -i file.csv -o file.ods

that's the whole vibe. in goes a csv, out comes an ods. no cap.


πŸ’œ DESCRIPTION πŸ’œ

so here's the tea 🍡 β€” this program reads a file in CSV format, which is just a table of columns delimited by commas, tabs, or literally any other character you want (you're the main character, you choose). then it creates a spreadsheet out of it. πŸ“Šβœ¨

and the lil detail that's lowkey so smart: if a value looks like a number, the cell gets formatted as a number too. it just knows. πŸ‘‘


πŸŽ€ OPTIONS πŸŽ€

  • --version β€” shows the program's version number and then dips. bye bestie πŸ‘‹
  • -h, --help β€” shows the help message and exits. your safety net, always there for you 🫢
  • -i INPUT, --input=INPUT β€” the input file, in csv. πŸ“₯
  • -o OUTPUT, --output=OUTPUT β€” the output file, in ods. πŸ“€
  • -d DELIMITER, --delimiter=DELIMITER β€” picks a one-character string to use as the field separator. defaults to "," btw, because commas are the moment πŸ’…
  • -c ENCODING, --encoding=ENCODING β€” says what encoding the csv file is in. defaults to utf-8. periodt ✨
  • -t TABLENAME, --table=TABLENAME β€” the table name in the output file. name her something cute πŸŽ€
  • -s SKIPINITIALSPACE, --skipinitialspace=SKIPINITIALSPACE β€” tells it how to read whitespace that comes right after a delimiter. defaults to False, which means whitespace right after a delimiter is part of the following field. so like, no stripping, she's keeping everything πŸ™ˆ
  • -l LINETERMINATOR, --lineterminator=LINETERMINATOR β€” picks the character sequence that should terminate rows. that's the thing that says "ok this row is done, next" ➑️
  • -q QUOTING, --quoting=QUOTING β€” this one can be any of these module constants, okay? here's the breakdown bestie:
    • 0 = QUOTE_MINIMAL β€” quotes only when required, like when a field contains either the quotechar or the delimiter. lowkey the chill option.
    • 1 = QUOTE_ALL β€” quotes are always placed around fields. every single one. no exceptions, extra af πŸ’…
    • 2 = QUOTE_NONNUMERIC β€” quotes always go around fields which don't parse as integers or floating point numbers. numbers get the naked treatment.
    • 3 = QUOTE_NONE β€” quotes are never placed around fields. absolutely none. feral.

the default is QUOTE_MINIMAL, so that's the starting vibe ✨

  • -e ESCAPECHAR, --escapechar=ESCAPECHAR β€” a one-character string used to escape the delimiter when quoting is set to QUOTE_NONE. so when quotes are off, this is your escape hatch πŸ•³οΈβœ¨
  • -r QUOTECHAR, --quotechar=QUOTECHAR β€” a one-character string to use as the quoting character. defaults to ". cute, classic, never not slaying πŸŽ€

🌈 EXAMPLE 🌈

csv2ods -i /etc/passwd -o accounts.odt -d:

yeah she's converting /etc/passwd with : as the delimiter and dropping accounts.odt. obsessed 😭πŸ”₯


πŸ‘‘ AUTHOR πŸ‘‘

  • Agustin Henze <agustinhenze at gmail.com> β€” the original author of csv-ods.py. thank you king, we owe you everything 🫢✨

bestie, if this ever looks wrong, remember: <italic>csv2ods</italic> don't play. run the example, check your delimiters, and hydrate πŸ’§

and that's the page!! source is odfpy, dated 02/11/2025 β€” mwah, take care of her, she's iconic πŸ’–πŸŽ€πŸ¦‹β­πŸŒ·

πŸ“¦ where this page comes from