Export data
Moderator: Mattk
- HeinrichH
- Gold Boarder

- Posts: 187
- Joined: Sun Jan 04, 2009 6:27 pm
- Location: Emmen-Netherlands / Panoias-Portugal
- Contact:
Export data
Is there a possibility to export data to a .csv file?
I want to export data from specific time periods to excel.
Thanks in advance
I want to export data from specific time periods to excel.
Thanks in advance
Checking the remote....
-
skyewright
- Platinum Boarder

- Posts: 873
- Joined: Fri Jan 25, 2008 6:27 pm
- Location: Isle of Skye, Scotland
Re:Export data
A copy of the raw data files could be read by excel as space delimited text.
However you might prefer something like using eithed the WSWIN or WD exports, then reading the files that they produce?
David
However you might prefer something like using eithed the WSWIN or WD exports, then reading the files that they produce?
David
Re:Export data
As skyewright said you can export to Excel.
I post here a few lines that may help you in order to read any of the weatehr files, obviously changing what is needed in each one:
Application.EnableCancelKey = xlDisabled
Application.EnableEvents = False
Sheets("STAT").Select
Application.ScreenUpdating = False
Application.Calculation = xlCalculationAutomatic
Sw = 100
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://www.yourweb.net/web2/datafolder/all-sensors.xml", Destination:=Range("A60"))
'.Name = "all-sensors"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = True
.BackgroundQuery = True
.RefreshStyle = xlOverwriteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = False
.RefreshPeriod = 10
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
.Delete
End With
ActiveWorkbook.Names("lVAL").Delete
ActiveWorkbook.Names.Add Name:="lVAL", RefersTo:="=STAT!" & Range(Range("A60"), Range("A12000").End(xlUp)).Address
You will need to change
www.yourweb.net/web2/datafolder to the exact URL in your case.
This is working fine in
http://www.telefonica.net/web2/vilacard ... nallet.xls
You would need to replace the smiley with " ) . without spaces
HTH,
Chill
I post here a few lines that may help you in order to read any of the weatehr files, obviously changing what is needed in each one:
Application.EnableCancelKey = xlDisabled
Application.EnableEvents = False
Sheets("STAT").Select
Application.ScreenUpdating = False
Application.Calculation = xlCalculationAutomatic
Sw = 100
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://www.yourweb.net/web2/datafolder/all-sensors.xml", Destination:=Range("A60"))
'.Name = "all-sensors"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = True
.BackgroundQuery = True
.RefreshStyle = xlOverwriteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = False
.RefreshPeriod = 10
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
.Delete
End With
ActiveWorkbook.Names("lVAL").Delete
ActiveWorkbook.Names.Add Name:="lVAL", RefersTo:="=STAT!" & Range(Range("A60"), Range("A12000").End(xlUp)).Address
You will need to change
www.yourweb.net/web2/datafolder to the exact URL in your case.
This is working fine in
http://www.telefonica.net/web2/vilacard ... nallet.xls
You would need to replace the smiley with " ) . without spaces
HTH,
Chill
Re:Export data
I'm thinking about doing something like this, can you tell me if this code is for excel or another program?
Dave
Dave
Re:Export data
Hi there Chill. I took a look at your excel spreadsheet and I really like it. I'm wanting to make something like that for myself, but do not have a clue on where to start. Can you steer me in the right direction?
Thanks
Thanks
Re:Export data
Sure! You may use my Excel as it is, so you can set English language as default among (Catalan/Spanish/English)...dcspicer wrote: Can you steer me in the right direction?
Thanks
But if you're aiming to make your own, what exactly do you want to know?
Overall what I did is:
Read files:
- meteoclimatic.txt
- rain0-day1
- th0-day1
- thb0-day1
- wind0-day1
- all-sensors.xml
Store each one of them in a different range in Excel sheet.
Compute needed data
Display convenient results
Of course you can do it in several ways. Now I'm trying to learn PHP which may be much better (or other languages).
I used Excel as a workaround while I'm able to make it the right way...
HTH,
Regards,
Re:Export data
Where on the server are these files kept?
I have found all except meteoclimatic.txt file.
- meteoclimatic.txt
- rain0-day1
- th0-day1
- thb0-day1
- wind0-day1
- all-sensors.xml
I have found all except meteoclimatic.txt file.
- meteoclimatic.txt
- rain0-day1
- th0-day1
- thb0-day1
- wind0-day1
- all-sensors.xml
Re:Export data
Well, actually I peek meteoclimatic.txt file from my web server, not from my meteohub server.
This file is created when you want to export meteohub data to meteoclimatic weather network (It may be a similar one for the network you use).
Probably you won't use this file.
In all-sensors.xml you may find all the updated info you need.
Chill
This file is created when you want to export meteohub data to meteoclimatic weather network (It may be a similar one for the network you use).
Probably you won't use this file.
In all-sensors.xml you may find all the updated info you need.
Chill
Re:Export data
ok So I finally started working on my excel spreadsheet and started to import the data. I'm having a little bit of a problem decoding the data. From the Rain0-Day1 file here is just a quick line that I copied
20090404000000 0.0 0 0.7 4.90 1
I know that the first part of the numbers is the date. But I do not have a clue on what the other columns mean.
Thanks
20090404000000 0.0 0 0.7 4.90 1
I know that the first part of the numbers is the date. But I do not have a clue on what the other columns mean.
Thanks
Re:Export data
Just download and READ meteohub manual from Downloads section http://www.meteohub.de/joomla/index.php ... &Itemid=29
You'll find what the data mean.
Chill
You'll find what the data mean.
Chill

