WXforum.net
Weather Software => Station Software Development => Topic started by: Meteo Middelburg on June 08, 2019, 02:53:18 AM
-
Hi,
I want to have my realtime data imported live in Excel.
The source file, .dat file, is updated every 250ms.
Ive heard the RTD function in Excel can do that, but i dont know how.
-
https://support.microsoft.com/en-us/help/289150/how-to-set-up-and-use-the-rtd-function-in-excel
-
Hi,
Thanks for your response [tup]
But unfortunately thats way above my knowledge #-o
-
What exactly are you trying to do? Just convert a static .DAT file to Excel? Or add a new line to an Excel spreadsheet every time a new .DAT file is written?
-
Hi, thanks for your reply [tup]
I already have my one minute .dat file updating in excel every minute and use that data for graphing etc.
And ive got another .dat file updating every 250ms live data.
That data (a single string with wind, winddirection, temperature, humidity, solar, barometer etc.) i want to be shown in just a single cell in the same excel workboo/sheet as the one minute updating file already working.
So for example windspeed in cell A1, winddirection in A2 or B1 and so on.
Not appending, just updating in its own cell.
-
If you have it running already, why not just clone that for a single cell on a new sheet? Personally I would use Openpyxl (under Python)
-
I have the one minute dat file updating every minute in excel.
But excel cant update faster then that with the excel auto update function.
I want the 250ms updating dat file to show data in excel to.
-
That's where you've lost me. Why do you want to update that fast?
It seems rather excessive. Wouldn't 2.5 seconds or so be more reasonable?
-
Like in this video.... [tup]
http://www.yoctopuce.com/EN/article/an-excel-rtd-server-for-yoctopuce-sensors
-
I see, but realistically, weather data typically doesn't need to be sampled that fast unless you're doing something really special.
Excel's 2-second limitation would satisfy most any PWS available today.
-
Ah... I see what you are trying to do. BTW, Excel acquires a lock to prevent another app from using it so that throws a spanner into the works UNLESS you write a special DCOM server (which is what I think the Yoctopuce thingy does). But salvation could be close if you don't mind using a bit of Python. Sadly, the best implementation of this without a lot of coding is PyXXL - but it costs.
-
Ah ok.
Are you familiar with python?
-
Yeah, very familiar with Python. It is pretty easy and there are code blocks all over the place.
-
Do i have to install Python to get this to work in excel or has it to be made in Python and can be installed as add option in excel?
-
Well, yeah, but then you have register it via win32com etc. Honestly, due to limitations in Excel (2 second file lock IIRC) you have to override a lot of stuff to make this work unless you buy PyXXL. There is a fair bit of coding.
-
Mm ok. I thought i could use excel to have my live and database weather data in it.
But its likely a bit difficult to get that working.
I managed to have excel to update every second with some vb code, but that made my laptop fan spin fast and took alot of memory...
I probably stick with Loggernet then. Wich is what i used to get excel its data.
Im using Loggernet LNDB database sql ce currently. Limited to 4gb if im right.
But the advantage of excel is i could edit the data on the spot instead of having to find an sql ce editor to manipulate data if needed.
-
Excel is not the tool to use here.
-
Hi,
What do you use, soft and hardware wise?
-
I would use a realtime DB like ReThinkDB or even Mongo (NoSQL) but one of the SQL dbs supported by WeeWx etc. Excel is not a database.
-
Ive installed Microsoft SQL Server 2017 yesterday, but its difficult to get it working.
I now how to add a database, but Loggernet LNDB engine doesn run with it...
-
I am not familiar with that but https://www.campbellsci.com/lndb Looks doable.
-
Yes i know, but that has sql compact edition max 4gb...
I dont know why, maybe that editable in same way:)
-
4 GB and you are out of space?