Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Injecting Live-data into an open excel spreadsheet?

Status
Not open for further replies.
I have seen this done and want to know if I can get help with this.
I want to use C++ to
- read an ARDUINO
- send data to an open excel spread sheet such that as data changes in my ARDUINO I can send it to the excel sheet and the values on screen continue to update.
It would not be new data gets a new line, but a field of values updates so I can have a live graph update for example as thing change.

This thread is about sending data from c++ to an active and open spreadsheet.

I have no idea how to inject live data into excel, and since I am asking, can I read a field back out again and have my c++ "manipulate it"?

Is this advanced or easy ???

Suggestions and (+) comments welcome.
 
I have done something like this a few years ago.

I had a PIC running a small program written in assembler, the program read the ADC and wrote the digitised value to the UART every second or so.
The UART sent the data as 9600bps asynchronous data to an RS 232 serial interface.

In a laptop PC I had MS Excel (2003 !) which had an "add-in" called PLX-DAQ.
The PLX DAQ intercepted the data which appeared on a serial port and wrote it into a cell in the spreadsheet.
All in all it worked quite well.

For PLX-DAQ, look here:

JimB
 
Sorry click-here, not intending to derail this thread.

What if there is no more serial port, just Win 10 and USB? Obviously a much more advanced Excel; 2016 IIRC.

Wanted to do something like that for years.
 
What if there is no more serial port, just Win 10 and USB?
The laptop which I used did not have a conventional serial port with a D9 connector, I used a USB to serial interface converter.

Win10 ?
I dont know, just download PLX-DAQ and try it.

JimB
 
I have done something like this a few years ago.

I had a PIC running a small program written in assembler, the program read the ADC and wrote the digitised value to the UART every second or so.
The UART sent the data as 9600bps asynchronous data to an RS 232 serial interface.

In a laptop PC I had MS Excel (2003 !) which had an "add-in" called PLX-DAQ.
The PLX DAQ intercepted the data which appeared on a serial port and wrote it into a cell in the spreadsheet.
All in all it worked quite well.

For PLX-DAQ, look here:

JimB
System Requirements

  • Microsoft Windows 98
  • Microsoft Office/Excel 2000 to 2003
  • May not work with newer software; no longer supported
I can work within that :)
But going to keep looking too.
 
Can you work with VBA????
I bet I could. I am going to start looking into it right now, literally.
This page will still be open...
So I will answer yes.

"If you can use the keyboard shortcut Alt + F11 to bring up the Visual Basic Editor within an Office Application, then it has VBA capabilities."

That works... I'm in !!!
 
Last edited:
If your version of excel still had DDE (dynamic data exchange), it is super easy. However, lots of antivirus software tries to turn it off because of vulnerabilities in this old-school data exchange.

I used it back in the 1990s to do exactly what you are trying to do and I am certain it is still part of excel. It uses some core MSwindows apppication-to-application data sharing in Windows. I think the new, less hazardous version is now OLE but not nearly as easy to use.

Updating data in a saved excel file is much easier because these are simply zipped sql files. The need to have a live display of unsaved data in a spreadsheet and the subsequent chart is much more difficult because you need to use a Windows data exchange protocol.
 
Win7:
start EXCEL: ALT + F11 (opens VBA)
VIEW: F7 (code)
Paste :
(Re: Data from the serial port directly in Excel table by Peter (guest)2007-03-13 06:35)... gaggle will translate from German...

It accepts and colorizes the code, so it's happy so far.
"cmnd $ = "Hello world" " ... delete space from stringvariablename and $ ---> cmnd$ = "Hello world" now it will compile
comment-out all com references and while/wend
then add: answer = "word" after close#1, compile and single step [F8], and it works.
"word" appears in excel cell 1,1

I did it :)
 
Last edited:
So I read a little about certificates.

Looks like any code I write can only be released as source because my compiled code will not work on any machine but mine.
So every laptop of mine I want to use my code on has to compile the code separately ?
Or do I accept "all certificates" from this computer to use on each of my other computers?

$474/year for signing to share compiled code.
Does my software stop working after a year, or can I just not sign with that anymore?

Is C++ like that too???
Is this how everyone shares, by passing source and compiling themselves?
 
What source code are you referring to? Excel macro sheets can have the code password protected and the user has to identify it as a "trusted" document.

Mike.
 
Not exactly what you are doing , however I fiddled around with an Esp32, and excel can read data via the network into a chart using json, but I never managed to get it to work automatically, it might be possible to do.
 
So I read a little about certificates.

Looks like any code I write can only be released as source because my compiled code will not work on any machine but mine.
So every laptop of mine I want to use my code on has to compile the code separately ?
Or do I accept "all certificates" from this computer to use on each of my other computers?

$474/year for signing to share compiled code.
Does my software stop working after a year, or can I just not sign with that anymore?

Is C++ like that too???
Is this how everyone shares, by passing source and compiling themselves?

No, you seem to be speaking nonsense, you're making no sense at all.

No 'certificates' required, I've no idea at all what you're in about?.
 
I read many articles yesterday and sounds like I jumped the gun.

This is one:

But probably this one is what confused me:


"The Limitation of Digital Certificates

The single biggest limitation of a digital certificate, and one that many people find surprising, is that
--> you can only trust a certificate on the computer on which it was created. This means that if you send a file to someone else with your digital certificate attached they won't be able to trust it.<--

This sounds very limited, but it is the way that Microsoft intended for this system to work. A digital certificate that you create yourself is intended for personal use only. It allows you to create your own code, or look at someone else's, and when you're satisfied that it's safe you can indicate that by attaching your self-signed certificate."

I mis-interpreted this whole section, thinking if it can't be trusted it won't run.

Combined with the previous link of "you need to buy a certificate, good for a year".

I thought it was a licence key required to release compiled code so it would work on machines other than the one you wrote it on.

My mistake.
 
Last edited:
The laptop which I used did not have a conventional serial port with a D9 connector, I used a USB to serial interface converter.

Win10 ?
I dont know, just download PLX-DAQ and try it.

JimB

Hola JimB

Excel 2016 here. The latest versions of PLX DAQ were rewritten specifically for Arduino. Would they be of any use to me working with PICs? Hard to find concrete information in the Web.

Sincerely I am at lost here. Thanks.
 
Hola JimB

Excel 2016 here. The latest versions of PLX DAQ were rewritten specifically for Arduino. Would they be of any use to me working with PICs? Hard to find concrete information in the Web.

Sincerely I am at lost here. Thanks.

RS232 is RS232, makes no difference what the processor might be - I doubt it was rewritten 'for' Arduino, I suspect it was rewritten because he wanted to use an Arduino with a modern computer, and the old version wouldn't work under a newer version of Windows.
 
RS232 is RS232, makes no difference what the processor might be - I doubt it was rewritten 'for' Arduino, I suspect it was rewritten because he wanted to use an Arduino with a modern computer, and the old version wouldn't work under a newer version of Windows.
The commands in the user guide, seem to be in native Arduino. I could be wrong maybe.
 
A Google of Arduino to Excel will get you a few dozen hits on how to do it. Microsoft has an add on for Excel called Microsoft Data Streamer which I use and like. They want membership in Office 365 but I just ran the download (Windows 10) and it works fine. I also use the mentioned PLX-DAQ and it also does fine.

You can try and write your own, but there is existing stuff out there. My Excel is a 2010 version running on Windows 10. I use both MS Data Streamer and Plex DAQ. No reason for me to write my own when what is available works.

Ron
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top