Transfer Real Time Data From Vb 2005 To Excel?Nov 24, 2009
I am working on a project that is able to display real time data from sensors from micro-controller. I am able to do so by sending the data through the serial port and then use vb 2005 to show the data. However, I want to save those data from vb 2005 to excel. How am I able to do it ? I am able to use vb to insert data to excel step by step, cell by cell using the following codes.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim oExcel As Object
Dim oBook As Object
Dim oSheet As Object
Lets say TextBox1.Text and TextBox2.Text is my real time data. How do I save it to the excel sheet displaying the data in cell A2, A3, A4 when the time goes by. Eg. If I want to save TextBox1.Text to excel it would be, the data in the 1st seconds in cell A2, data in the 2nd seconds in A3, 3rd seconds A4, 4th seconds in A5, A6 and so on...