Windmill Software Ltd
Windows Engineering Software

OpenOffice DDE
August 2005

Windmill and OpenOffice

Home
Newsletters
Catalogue

subscribe to free data acquisition newsletter

Route Data from Transducers and Laboratory Instruments into OpenOffice

Windmill software reads data from instruments and devices connected to your PC. We have a range of drivers for many types of equipment, and our generic serial communication driver is now free to our newsletter subscribers. This means that you can acquire data from instruments with RS232 ports, and import it into OpenOffice.

OpenOffice is an open-source office suite and therefore free!

You can collect data with the free Windmill Logger application, and after collection has finished import it into your OpenOffice spreadsheet. Alternatively you can transfer data as it arrives, using dynamic data exchange. To do this use the free Windmill DDE Panel as a gateway to transfer data values between your instruments and OpenOffice.

Importing Logged Data into OpenOffice | Acquiring Live Data in OpenOffice | More Information


Importing Logged Data into the OpenOffice Spreadsheet

  1. In the OpenOffice spreadsheet, choose File - Open.
  2. In the "Files of Type" box, select Text CSV.
  3. In the File name box type *.wl and click the Open button. Your saved Logger data files are shown. Select one and clickOpen.
  4. You will see the Text Import dialogue. Click OK.
  5. The logged file is shown with the data lined up in the appropriate columns.

Acquiring Live Data in OpenOffice

The Windmill DDE Panel lets you copy and paste live data into OpenOffice. Just press the Copy to Clipboard button and choose the type of information you want to copy: data values, channel names, data units, alarm settings, etc. Move to OpenOffice, select Paste Special from the Edit menu and choose to paste as a link. The data in OpenOffice will continually update. (Note, it may take several seconds for the data to appear.)

The code that will be inserted if you choose to paste All Channels is
{=DDE("WINDMILL","Data","AllChannels")}
and for one channel called Chan_00
{=DDE("WINDMILL","Data","Chan_00")}

For more sophisticated tasks, you can use macros.

Using Macros for Analysis and Control with OpenOffice

To try out data acquisition into OpenOffice

  1. Load Windmill DDE Panel and start collecting data from your instrument.
  2. Load OpenOffice with a clean sheet, and then select menu item Tools.Macros.Macro.
  3. Click the Edit button.
  4. To read data from one channel connected to the Windmill DDE Panel and place it into a cell in the spreadsheet, create the following code.
    ' Read data value from channel "Tank_Temp" in Windmill
    ' DDE Panel and write the result in cell A1
    Sub DDEread()
    
    ' Opens a DDE conversation with the Windmill DDE 
    ' Panel using the Service Name "Windmill" and the  
    ' Topic Name "Data"
    ddeChan = OpenOffice.DDEInitiate("Windmill", "data")
    
    ' Requests data from a channel called Tank_Temp.
    myData = DDERequest(ddeChan, "Tank_Temp")
    oCellRange = ThisComponent.Sheets.Sheet1.getCellRangeByName("A1")
    	ThisComponent.CurrentController.Select(oCellRange)
    	ThisComponent.CurrentSelection.FormulaLocal = myData
    
    ' Closes the DDE conversation.
    DDETerminate (ddeChan)
    End Sub
    

Question on using OpenOffice with Windmill Software?

Question:

Windmill Version: 
Name:             
Organisation:     
E-mail:           

Home | Windmill | On-Line Shop | Free Literature and Software Demos | Contents | Search

Copyright Windmill Software Ltd 2001
PO Box 58, North District Office, Manchester, M8 8QR, UK.
E-mail: sales@windmill.co.uk, Tel:+44 161 833 2782
http://www.windmill.co.uk/
Data Acquisition News Feed (RSS) Free measurement news feed...
Designed by Studholme.net

Search