need help in serial port data aquisition to openoffice spredsheet
need help in serial port data aquisition to openoffice spredsheet
need help in serial port data aquisition to openoffice spredsheet
need help in serial port data aquisition to openoffice spredsheet
need help in serial port data aquisition to openoffice spredsheet
need help in serial port data aquisition to openoffice spredsheet need help in serial port data aquisition to openoffice spredsheet need help in serial port data aquisition to openoffice spredsheet need help in serial port data aquisition to openoffice spredsheet need help in serial port data aquisition to openoffice spredsheet need help in serial port data aquisition to openoffice spredsheet need help in serial port data aquisition to openoffice spredsheet need help in serial port data aquisition to openoffice spredsheet
need help in serial port data aquisition to openoffice spredsheet need help in serial port data aquisition to openoffice spredsheet
need help in serial port data aquisition to openoffice spredsheet
Go Back  Xtreme Visual Basic Talk > > > need help in serial port data aquisition to openoffice spredsheet


Reply
 
Thread Tools Display Modes
  #1  
Old 07-09-2010, 11:09 AM
migalhas migalhas is offline
Newcomer
 
Join Date: Jul 2010
Posts: 1
Angry need help in serial port data aquisition to openoffice spredsheet


hi I'm Miguel and I was doing a program to read the information from the serial port...
everything was going well until the moment that I couldn't Read all the information from the serial port.. thats my code, not all of them but what interests more...

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim oSM As Object

Dim oDesk As Object
Dim oDoc As Object
Dim oSheet As Object
Dim oCell As Object
Dim Data As String, Data1() As String
Dim Row, Col As Object
Dim oCellData, oCellData1 As Object
Dim oCellData2() As Integer
Dim FirstCol As New Object, FirstRow As New Object




oSM = CreateObject("com.sun.star.ServiceManager")
oDesk = oSM.createInstance("com.sun.star.frame.Desktop")
Dim aNoArgs(-1) As Integer

oDoc = oDesk.loadComponentFromURL("file:///C:/Relatório.ods", "_blank", 2, aNoArgs)
oSheet = oDoc.Sheets.getByIndex(0)

Col = 1
Row = 12
FirstCol = oSheet.getColumns
FirstCol = FirstCol.getByIndex(Col)
FirstRow = oSheet.getRows
FirstRow = FirstRow.getByIndex(Row)

oCell = oSheet.getCellRangeByName("B1254")
oCell.charheight = 16
oCell.Columns.width = 4000

'oCell = oSheet.getCellByPosition(Col, Row)

oCell = oSheet.getCellByPosition(Col, Row)
Data = rtbMonitor.Text 'rtbMonitor is a textbox
Data1 = Split(Data, " ", -1, 54)
'DataLen = Len(Data1)
Do While Row <= 54
If oCell.getValue = False Then
oCell.setString(Data1(1))
Col = Col + 1
oCell.setString(Data1(2))
Col = Col + 1
oCell.setString(Data1(3))
Row = Row + 1
End If
Loop

'oDoc.close(True)
End Sub
End Class

my objective is to read all data and write it to a spreadsheet of openoffice, more directly to cells 12 to 54 and from column 1 to 3..
I don't know how much information the serial port receive, at minimum it receives 3 arrays at maximum it receives a lot of arrays but at the moment I know that it receives for less 3 arrays made by me Data1(1), Data1(2) and Data1(3) but that code only writes the final array at the cell 12 in column 1 and I'm pretending to write the first array Data1(1) in cell 12 column 1, the Data1(2) in the same row but in column 2 and Data1(3) at column 3..... And when the third cell at the third column has data inside it should change the row to fill the next row in the same way of the first row but with more 3 arrays in case of having been sent by serial port and here is more one problem, i don't know if serial port sent 3 or 6 or 9 or 12 etc., arrays.
Anyone can help me pls?I would be grateful...
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
need help in serial port data aquisition to openoffice spredsheet
need help in serial port data aquisition to openoffice spredsheet
need help in serial port data aquisition to openoffice spredsheet need help in serial port data aquisition to openoffice spredsheet
need help in serial port data aquisition to openoffice spredsheet
need help in serial port data aquisition to openoffice spredsheet
need help in serial port data aquisition to openoffice spredsheet need help in serial port data aquisition to openoffice spredsheet need help in serial port data aquisition to openoffice spredsheet need help in serial port data aquisition to openoffice spredsheet need help in serial port data aquisition to openoffice spredsheet need help in serial port data aquisition to openoffice spredsheet need help in serial port data aquisition to openoffice spredsheet
need help in serial port data aquisition to openoffice spredsheet
need help in serial port data aquisition to openoffice spredsheet
 
need help in serial port data aquisition to openoffice spredsheet
need help in serial port data aquisition to openoffice spredsheet
 
-->