Author |
Topic: DATA I/O to EXCEL =? |
ed packard
From: Show Low AZ
|
Posted 11 Jul 2009 10:18 am
|
|
Need input on streaming data to & from Excel via USB, Firewire, or ?
Edp |
|
|
|
John Cipriano
From: San Francisco
|
Posted 11 Jul 2009 2:31 pm
|
|
I'm curious: why Excel, and why does it have to be live? What does the data look like, and what are you hoping to do with it?
Does the data become useless once it's old, or is something like a laboratory measurement, where it might be sufficient just to capture everything for an hour or so and then analyze it once it's captured?
If you weren't using Excel, how would the data be coming in? Is this some special USB gear with its own driver?
Or are we talking about text or other excel files stored on an external drive? |
|
|
|
ed packard
From: Show Low AZ
|
Posted 11 Jul 2009 3:25 pm Curiosity killed the cat
|
|
John..."Why Excel?"...#1. because I have "stuff" that I have worked up since there was only VisiCalc.#2. I want to minimize the lines of code I would need to write.
The data is a stream of digital numbers in....they are processed...and then streamed out. Latency is an issue.
Right, "useless when it is old". I have pgms that take measurements, allow storing them in Excel, and bringing the data back later.
Real time...latency is an issue.
Not text....not other Excel files...not on an external hard drive. |
|
|
|
b0b
From: Cloverdale, CA, USA
|
|
|
|
ed packard
From: Show Low AZ
|
Posted 11 Jul 2009 4:14 pm in and out
|
|
And the thruput time might be? |
|
|
|
b0b
From: Cloverdale, CA, USA
|
Posted 11 Jul 2009 4:19 pm
|
|
Oh, you want real time acquisition? I think you'd have to write that in VB or C#. Not my area of expertise. Sorry. _________________ -𝕓𝕆𝕓- (admin) - Robert P. Lee - Recordings - Breathe - D6th - Video |
|
|
|
ed packard
From: Show Low AZ
|
Posted 11 Jul 2009 4:22 pm
|
|
I was afraid of that!
VBA can control Excel, so maybe....
Thanks for the thought. |
|
|
|
John Cipriano
From: San Francisco
|
Posted 11 Jul 2009 4:39 pm
|
|
What's the worst latency you can tolerate?
Because my first thought (and keep in mind I have very rarely done any VBA) was to write a program in a different language that will listen for the data and write it to a text file. Then have an Excel macro that reads from the file on some time interval. Like you write the file more or less live but you have excel refresh at some time interval that works for you, maybe every 5 seconds as an example.
There might be an issue on Windows with trying to access the file while it's being written. Which makes me think that there's got to be a better way than that. There may or may not be a way to have VBA listen for the data, but I don't know.
My mostly uninformed hunch is that a solution that doesn't require storing to a temporary file will require COM / the Excel API.
http://msdn.microsoft.com/en-us/library/bb687829.aspx
But how do you currently receive the data? You say it's not written to a file. Is it a USB-to-Serial link? Is there a program that displays the data?
I just remembered that you said the stream has to go back out. Depending on how the data is coming in and the way in which you're trying to transform it, Excel might not be the best way to go. Python is, in my opinion, very easy as far as programming languages go, and yet extremely flexible. You might be able to do something in Python. I guess it depends on how much time this is worth _________________ MSA Semi-Classic S10 w/ 4P+4L and some shiny new tuners |
|
|
|