SHARE
Facebook X Pinterest WhatsApp

Convert SpreadSheets to CSV files with Python and pyuno, Part 1v2

Written By
MF
Mitch Frazier
Jul 24, 2009

“The regular expression search checks to see if the input file
name can be broken into a file name part and a sheet name part. If
it can, and only if the original unbroken input file name does not
refer to an existing file, the pieces are used as the input file
and sheet specification. Checking to see if the original unbroken
input file name refers to an existing file allows you to specify
input files that have colons and at signs in their names, and it
continues to work even in the case where you have an input file
with a colon or at sign in its name and you want to extract a
particular sheet, for example:

$ python ssconverter.py this:month.xls:sales output.csv

“will correctly recognize that the sheet name is “sales” and
that the file name is “this:month.xls”. Since the regular
expression search is be default greedy the break will occur at the
last colon and since “this:month.xls:sales” does not refer to an
existing file the match will be used.”


Complete Story

MF

Mitch Frazier

Recommended for you...

5 Best Free and Open Source Text Expander Tools
webmaster
Jun 13, 2025
Grafito: Systemd Journal Log Viewer with a Beautiful Web UI
Bobby Borisov
Jun 12, 2025
FreeBSD Wants to Know a Few Things
brideoflinux
May 11, 2025
NVK enabled for Maxwell, Pascal, and Volta GPUs
Kara Bembridge
May 1, 2025
Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2025 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.