Export data to openoffice

685 views
Skip to first unread message

Søren Helskov

unread,
Jan 28, 2014, 2:00:59 PM1/28/14
to weewx...@googlegroups.com
Hi Guys

Is is possible in any way to export the database so it can be read in openoffice or Exel?
Why i want this is that i have added an extra Temp sensor to my weather station. This 
sensor is modded so i can measure the Water return Temperature on my Air to Water heatpump.


The return temperature depends on outdoor temperature. 
I want to optimize my heatpump. Therefore i want to use
raw data from etc, Exel or Openoffice. 
Have tried open the sdb file in exel but most of data is not readable. 

Best Regards
Søren .H. Christensen

mwall

unread,
Jan 28, 2014, 2:16:16 PM1/28/14
to weewx...@googlegroups.com
On Tuesday, January 28, 2014 2:00:59 PM UTC-5, Søren Helskov wrote:

Is is possible in any way to export the database so it can be read in openoffice or Exel?

hi søren,

put this into a shell script, say 'dumpdata.sh':

#!/bin/sh
sqlite3 /home/weewx/weewx.sdb << EOB
.headers on
.mode csv
select * from archive;
EOB

make it executable:

chmod 755 dumpdata.sh

then invoke it like this:

dumpdata.sh > filename.csv

you should see all the data in a file called filename.csv

m

Søren Helskov

unread,
Jan 28, 2014, 5:47:06 PM1/28/14
to weewx...@googlegroups.com
Thx works great!

Best Regards

Søren Helskov

unread,
Jan 29, 2014, 2:59:42 AM1/29/14
to weewx...@googlegroups.com
I do have a question to the data inside.
Some of them looks a bit strange. Heres an example of a Temperature

Why this long string 781.314.285.714.286. As is see it it must be 78.13. 
I have a lot of these data inside. I believe i can correct it with Exel or Openoffice. But
is there a reason for this? And could this be the reason for my earliere problems with rubbish data as posted here?


77.72
77.72
781.314.285.714.286
78.44
84.38
90.32
100.85
104.36
104.18
104.0
104.694.285.714.286
105.62

I have posted my csv file


Best Regards
filename.zip
Reply all
Reply to author
Forward
0 new messages