[Baypiggies] newbie question - automating my reporting tasks

Chris Clark Chris.Clark at ingres.com
Wed May 16 21:13:48 CEST 2007


Are you wedded to Excel? It sounds like that part of the process would 
be a good candidate for removal and just process the raw text file in 
Python either via dict, lists, set, etc. or by dumping it into a 
database to do the grunt work  (using a Python dbi driver). If you went 
that route, some of the file IO tutorials would be a good place to 
start. This one;  http://www.penzilla.net/tutorials/python/fileio/ 
actually implements some summation but the first page of 
http://www.devshed.com/c/a/Python/File-Management-in-Python/ is probably 
a little easier to get started with.

You should be able (eventually) to handle everything in python; pulling 
down the files, processing, mailing the results. If you stick with Excel 
you either need to make that part manual or deal with COM if you want to 
automate that part from Python.

Tony - thanks for the xlrd link, that's going to save me *loads* of work 
for a pet project I've got :-) I thought I was going to have to use the 
Python-UNO bridge.

Chris


Alden Meneses wrote:
> thanks. I am sure this will come in handy.
>
> On 5/16/07, *Tony Cappellini* <cappy2112 at gmail.com 
> <mailto:cappy2112 at gmail.com>> wrote:
>
>     Hello Alden,
>
>     I've recently used this Python package for converting Excel files into
>     .CSV files.
>     http://www.lexicon.net/sjmachin/xlrd.htm
>
>     It worked well for my needs, but it has some limitations.
>
>     Good luck.
>
>
>     On 5/16/07, Alden Meneses < aldenm at gmail.com
>     <mailto:aldenm at gmail.com>> wrote:
>     > Hello all,
>     >
>     > It does seem that Python is easier to lean than PERL. and I like the
>     > interpreter.
>     >
>     > I have some text files that I download from an AS400 and format
>     with Excel.
>     > Basically I convert the text to columns then sort and subtotal.
>     The results
>     > are then emailed to various people and also used in other
>     reports. Haven't
>     > really thought out how to automate this whole process but wanted
>     to start
>     > with a project to learn python and go from there.
>     >
>     > I have skimmed throught the python tutorial and now getting into
>     python in a
>     > nutshell, 2nd edition and would welcome any thoughts or
>     suggestions in
>     > getting my project off the ground. I've taken programming
>     courses in college
>     > - C, C++, PERL, FORTRAN, PASCAL, UNIX shell scripting and its
>     been awhile
>     > since I had to rely on it.
>     >
>     > Thanks in advance,
>     > Alden
>     > _______________________________________________
>     > Baypiggies mailing list
>     > Baypiggies at python.org <mailto:Baypiggies at python.org>
>     > To change your subscription options or unsubscribe:
>     > http://mail.python.org/mailman/listinfo/baypiggies
>     >
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Baypiggies mailing list
> Baypiggies at python.org
> To change your subscription options or unsubscribe:
> http://mail.python.org/mailman/listinfo/baypiggies



More information about the Baypiggies mailing list