Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.datemas.de!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:Python': 0.06; '21,': 0.07; 'column': 0.07; 'file)': 0.09; 'latter': 0.09; 'parameter': 0.09; 'cc:addr:python-list': 0.11; 'suggest': 0.14; 'windows': 0.15; '(note,': 0.16; 'csv': 0.16; 'formula': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'subject:Reading': 0.16; 'tab': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'trying': 0.19; 'file,': 0.19; 'separate': 0.22; 'cc:addr:python.org': 0.22; 'beauty': 0.24; 'config': 0.24; 'skip': 0.24; 'cc:2**0': 0.24; 'source': 0.25; 'script': 0.25; 'define': 0.26; 'header:In-Reply-To:1': 0.27; 'specifically': 0.29; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; '(maybe': 0.31; '(new': 0.31; 'argue': 0.31; 'parameters.': 0.31; 'file': 0.32; 'guess': 0.33; 'actual': 0.34; 'could': 0.34; "can't": 0.35; 'something': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'data,': 0.36; "i'll": 0.36; 'subject:?': 0.36; 'easily': 0.37; 'step': 0.37; 'major': 0.40; 'most': 0.60; 'new': 0.61; "you're": 0.61; 'back': 0.62; 'real': 0.63; 'such': 0.63; 'taking': 0.65; 'flexibility,': 0.84; 'spreadsheet': 0.84; 'info,': 0.91; 'to:none': 0.92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=0wzHolQ3MxE3KNV+nSORcqqex3lCzPxSoq/FB14GOyI=; b=hq9jqWkn8CoaJCrPel4/6k9N9l+aqcR5rLNTl83tYVW7H1xH7BN/Y505j5hkJbg/1s hYRDiPRVdAoh+4vjGwG1gAyI0o1AcAEtsOoxuW2VEdyl702VzSoxFLluYtf81kzRegfy S5cj/q+PJ1S/XL0jF3IxrCLhUQHmL/qnYCCCJE+f8L8RViBeebk0e/Ovuf5nUXfJEzxI b3Fhzk7EnZNB4oKlatJ9PfGoG0e7qoDkUOD76Se16LUB1y7p3ZbZa40YbIhHuAXeGYaA 9S7hns4TwLDBo8t/5RFjW6EWfwRFJmGbZF64Q1kk/IZrNnwzshRrdydmGYM/QHCW9Ayv 1CIQ== MIME-Version: 1.0 X-Received: by 10.221.27.8 with SMTP id ro8mr4909908vcb.30.1400604549639; Tue, 20 May 2014 09:49:09 -0700 (PDT) In-Reply-To: References: Date: Wed, 21 May 2014 02:49:09 +1000 Subject: Re: Reading OpenOffice spreadsheet in Python? From: Chris Angelico Cc: Python Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 25 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1400604558 news.xs4all.nl 2926 [2001:888:2000:d::a6]:38954 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:71814 On Wed, May 21, 2014 at 2:38 AM, Skip Montanaro wrote: > Before someone suggests > config parser/Windows INI files... A spreadsheet format is kinda handy > in this case because I do use a few formulas to define some of the > parameters. Adding a new row (new config file) or column (new > parameter) is a breeze. 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)? Organize your source file in such a way that adding a new config file or new parameter is easy. The beauty of a spreadsheet is that a cell could be *either* a formula *or* actual data, completely indistinguishably (note, some may argue that this is also a major weakness of spreadsheets); I would guess you most likely don't need that flexibility, and can easily separate "source" and "calculated". You could make your file format CSV or tab delimited, and then use LibreOffice to edit it, if that makes the most sense. Something to consider, since I can't specifically advise on OO/LO readers/writers. :) ChrisA