Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #71832

Re: Reading OpenOffice spreadsheet in Python?

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <skip.montanaro@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.013
X-Spam-Evidence '*H*': 0.97; '*S*': 0.00; 'output': 0.05; 'subject:Python': 0.06; 'latter': 0.09; 'cc:addr:python-list': 0.11; 'suggest': 0.14; 'template': 0.14; 'windows': 0.15; 'csv': 0.16; 'from:addr:pobox.com': 0.16; 'from:addr:skip': 0.16; 'simplicity.': 0.16; 'sorts': 0.16; 'subject:Reading': 0.16; 'xlrd': 0.16; 'files.': 0.16; 'sender:addr:gmail.com': 0.17; 'wrote:': 0.18; 'trying': 0.19; 'file,': 0.19; "hasn't": 0.19; 'typing': 0.19; 'separate': 0.22; 'cc:addr:python.org': 0.22; 'config': 0.24; 'skip': 0.24; 'tend': 0.24; '(or': 0.24; 'cc:2**0': 0.24; 'script': 0.25; 'excel': 0.26; 'somewhere': 0.26; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'leave': 0.29; 'am,': 0.29; 'xml': 0.29; 'message-id:@mail.gmail.com': 0.30; 'along': 0.30; "i'm": 0.30; '(maybe': 0.31; 'occurs': 0.31; 'figure': 0.32; 'open': 0.33; 'updated': 0.34; "i'd": 0.34; 'could': 0.34; 'something': 0.35; 'form.': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'right?': 0.36; "i'll": 0.36; 'subject:?': 0.36; 'step': 0.37; 'files': 0.38; 'issue': 0.38; 'read': 0.60; 'manually': 0.60; 'solve': 0.60; 'today,': 0.61; "you're": 0.61; 'back': 0.62; 'information': 0.63; 'real': 0.63; 'taking': 0.65; 'to:addr:gmail.com': 0.65; '20,': 0.68; 'export': 0.74; 'actually,': 0.84; 'spreadsheet': 0.84; 'info,': 0.91; 'ultimate': 0.93
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=n4LAHTV3WM0xebkGEUrrd0I5YC9h54gLEYFy9y/OCvQ=; b=Bef8gppTvF4PDvO6Rq0XoX1ZdaA7B66Ojl819akc6d9IfOZRQcqSfxfgVuQUFdk1SH RxkfMdOO7Xbi+mmOLtF2zcqOrhqIOWsOAMA/wEyBJPJ6tRYH++KeyXp8e5eBcWyMQlUK ruCT5XkEOt76jdUb3fTVKj7CqSZGKo2IyC4r8V/L0YZeBfORCBy7U6tUsudlwIE6GWIu /wwNqfNh5fvHLOs65XrvV3fpJiUZiYa7w/VVvVO7pSmghPMGBOg3Sb/XyKk4lmk9zK8B YIkqmA8Szk41GVIAPn6S/niV+96Of+yzsW2afG+eu1IowEk74kCXUAWngFWIaCK6Fz28 wydg==
MIME-Version 1.0
X-Received by 10.50.79.134 with SMTP id j6mr8909194igx.6.1400624189224; Tue, 20 May 2014 15:16:29 -0700 (PDT)
Sender skip.montanaro@gmail.com
In-Reply-To <CAPTjJmqT1B2UHvCJUUuzhqw6FPJHfm7inUOO7ybT+Uzvq5WBRw@mail.gmail.com>
References <CANc-5UzTNW09cpi3fQr8squszvALgvmDKzkNOZP8GZx9DNOJfg@mail.gmail.com> <CAPTjJmqT1B2UHvCJUUuzhqw6FPJHfm7inUOO7ybT+Uzvq5WBRw@mail.gmail.com>
Date Tue, 20 May 2014 17:16:29 -0500
X-Google-Sender-Auth 8ld2mPs_gkX47SUjlBx4YYvto1o
Subject Re: Reading OpenOffice spreadsheet in Python?
From Skip Montanaro <skip@pobox.com>
To Chris Angelico <rosuav@gmail.com>
Content-Type text/plain; charset=UTF-8
Cc Python <python-list@python.org>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.10175.1400624612.18130.python-list@python.org> (permalink)
Lines 24
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1400624612 news.xs4all.nl 2893 [2001:888:2000:d::a6]:47889
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:71832

Show key headers only | View raw


On Tue, May 20, 2014 at 11:49 AM, Chris Angelico <rosuav@gmail.com> wrote:
> Okay, I won't suggest Windows INI files, but I'll still suggest taking
> a step back and figuring out exactly what you're trying to accomplish.
> Can you separate out the real data from the formula-derived info, put
> the former into a git-managed file, and the latter into something you
> regenerate by script (maybe off a makefile)?

Actually, I'm sympathetic to INI files. I like the simplicity. The
ultimate config files are output in XML though (ugh). Somewhere along
the way, I want to avoid typing repetitive information into files.
Today, I use a template file, read the spreadsheet with xlrd and
generate the XML cruft with Cheetah. I could retain Excel (or Open
Document or pyspread or some other spreadsheet) and then export to CSV
files. That would solve the issue as well. Though it would be an extra
step I'd have to do manually (because I can rely on xlrd), it would
still leave me with the input-to-config-file data in tabular form.

I'll figure something out. Something else that occurs to me as I write
this is that Excel files tend to acquire all sorts of cruft, right? Or
is that just Word files? Perhaps I can make things better by
copying/pasting the existing spreadsheet data into a fresh spreadsheet
that hasn't been updated repeatedly?

Skip

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Reading OpenOffice spreadsheet in Python? Skip Montanaro <skip@pobox.com> - 2014-05-20 17:16 -0500

csiph-web