Mercurial > hg > ooxml
changeset 51:793496d2d165
allow command line input
author | Henry S. Thompson <ht@markup.co.uk> |
---|---|
date | Tue, 16 May 2017 17:27:19 +0100 |
parents | 01a7c2ebd3d1 |
children | 9bb415e0adc9 |
files | parse.py |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/parse.py Thu May 11 09:29:33 2017 +0100 +++ b/parse.py Tue May 16 17:27:19 2017 +0100 @@ -1,3 +1,4 @@ +#!/usr/bin/python2.7 ''' Tokenise Excel formulae Starting from regexps and concat rules in https://sites.google.com/site/e90e50/random-topics/tool-for-parsing-formulas-in-excel @@ -50,6 +51,9 @@ f="""=IF(I$1>$C$2,VLOOKUP($C52,GP_input!$C$187:$CM$196,VLOOKUP($C$9,lists!$A$34:$B$39,2,FALSE)+BC$4,FALSE),SUMIF('BEX2011'!$C$32:$C$5000,$B$9&"sl"&$B52&$C52&$B53,'BEX2001'!Q$32))""" +if len(sys.argv)>1: + f=sys.argv[1] + l=tokPat.findall(f) ## Visual basic code: