Serial communication and export to excel

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have to import data through the serial port and export the data to an excel file, is it possible to do these things standard with Visual C#.NET
I mean, is it possible without installing plug-ins?

Greets!
 
Rob,

Yes, it is. You can call the CreateFile API function through the
P/Invoke layer to get a handle to the serial port. Once you have this, you
can pass that handle to a FileStream class instance to have the stream read
and write from the serial port. Then, you can create an interop assembly
for Excel, allowing you to access the object model through COM interop.
Also, if you just need to insert data of a tabular nature, you could always
use the OLE DB provider for text as well.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Rob Looijmans said:
I have to import data through the serial port and export the data to an
excel file, is it possible to do these things standard with Visual C#.NET?
 
Back
Top