On 12/05/2019 11:27, Dave Hill wrote: > I found out by accident that the Megger PAT 420 data backup is actually > an SQLite database, so that is my route for access. Having played with > Python on Raspberry Pi's, I thought I would explore Python for data > processing, and now, I have a set of programs which extract SQLite, to > 'csv' then collate/process this data and produce a multi-page ODS > spreadsheet document, which lists tests by location. I also have an > application which extracts appliances requiring testing within a +/- 30 > day window, so I have a target for testing.
You could do it all in native SQLite SQL of course. You can tell sqlite to output its results in Excel CSV format and to a file rather than (or in addition to) stdout. So you can write a standard query and have it generate your Excel readable file directly. You can then automate that as a batch job in the OS... Assuming you run the same reports regularly. Much as I love Python sometimes the native tools are even better... -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor