Does Basic in Openoffice spreadsheet include commands to run something similar to the following test sw. eg. Below.
Specifically is "com1 " supported or is there an equivalent in Openoffice Basic?
as in. "Dim Incoming As String = com1.ReadLine()" eg.Below
( the aim is to import real time data from a usb. port to spreadsheet on PC. )
eg.
Function ReceiveSerialData() As String
' Receive strings from a serial port.
Dim returnStr As String = ""
Dim com1 As IO.Ports.SerialPort = Nothing
Try
com1 = My.Computer.Ports.OpenSerialPort("COM1")
com1.ReadTimeout = 10000
Do
Dim Incoming As String = com1.ReadLine()
If Incoming Is Nothing Then
Exit Do
Else
returnStr &= Incoming & vbCrLf
End If
Loop
Catch ex As TimeoutException
returnStr = "Error: Serial Port read timed out."
Finally
If com1 IsNot Nothing Then com1.Close()
End Try
Receive strings live. from serial port to PC.spreadsheet via Basic
Receive strings live. from serial port to PC.spreadsheet via Basic
OpenOffice 4.1 on Windows 7
Re: Receive strings live. from serial port to PC.spreadsheet via Basic
C++, Java, Python, or anything Microsoft has to offer, but not the supplementary StarBasic lingo.
Simply write the data into a text file and handle that with any software able to load text.
Simply write the data into a text file and handle that with any software able to load text.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: Receive strings live. from serial port to PC.spreadsheet via Basic
It worked with the ancient old versions of the OpenOffice.org, but not work with the newer version of the Apache OpenOffice nor LibreOffice:
https://forum.openoffice.org/en/forum/v ... .php?t=682
https://forum.openoffice.org/en/forum/v ... 20&t=31686
https://forum.openoffice.org/en/forum/v ... .php?t=682
https://forum.openoffice.org/en/forum/v ... 20&t=31686
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Re: Receive strings live. from serial port to PC.spreadsheet via Basic
You can declare Windows API functions in OOBasic. If you search for VB6 results for what you want - sometimes little translation is needed - so long as a few things like memory pointers aren't used it should run in OO.
I quickly found this,
http://www.thescarms.com/vbasic/CommIO.aspx
Edit: if you can't get something to work from within OO automation is another option.
I quickly found this,
http://www.thescarms.com/vbasic/CommIO.aspx
Edit: if you can't get something to work from within OO automation is another option.
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
Re: Receive strings live. from serial port to PC.spreadsheet via Basic
Thanks folks,
That last link looks promising.JeJe.
Any further suggestions most welcome.
That last link looks promising.JeJe.
Any further suggestions most welcome.
OpenOffice 4.1 on Windows 7