LabOne Net Link

The CSV data sent to the application is a snap-shot of the data set on the web server at the time of the request. Many applications support either manual or periodic refresh functionality.

Since tabs can be instantiated several times within the same user interface, the link is specific to the tab that it is taken from. Changing the session on the LabOne User Interface or removing tabs may invalidate the link.

Supported applications:

Excel

These instructions are for Excel 2010 (English). The procedure for other versions may differ.

  1. In Excel, click on the cell where the data is to be placed. From the Data ribbon, click the "From Text" icon. The "Import Text File" dialog will appear.

    netlink excel 01
  2. In LabOne, click the "Link" button of the appropriate Math tab. Copy the selected text from the "LabOne Net Link" dialog to the clipboard (either with Ctrl-C or by right clicking and selecting "Copy").

    netlink excel 02
  3. In Excel, paste the link into the "File name" entry field of the "Import Text File" dialog and click the "Open" button. This will start the text import wizard. Ensure that the "Delimited" button is checked before clicking the "Next" button.

    netlink excel 03
  4. In the next dialog, select the delimiter character corresponding to that selected in LabOne (this can be found in the "Sessions" section of the Config tab). The default is semicolon. Click the "Next" button.

    netlink excel 04
  5. In the next dialog, click on "Finish" and then "OK" in the "Import Data" dialog. The data from the Math tab will now appear in the Excel sheet.

    netlink excel 05
  6. The data in the sheet can be updated by clicking the "Refresh All" icon. To make updating the data easier, the "Import text file" dialog can be suppressed by clicking on "Properties".

    netlink excel 06
  7. Deactivate the check box "Prompt for file name on refresh".

    netlink excel 07

MATLAB

By copying the link text from the "LabOne Net Link" dialog to the clipboard, the following code snippet can be used in MATLAB to read the data.

textscan(urlread(clipboard('paste')),'%s%s%f%s%d%s%s','Headerlines', 4,'Delimiter', ';')

Python

The following code snippet can be used in Python 2 to read the LabOne Net Link data, where "url" is assigned to the text copied from the "LabOne Net Link" dialog.

import csv
import urllib2
url = "http://127.0.0.1:8006/netlink?id=c0p5t6p1cfplotmath&ziSessionId=0"
webpage = urllib2.urlopen(url)
datareader = csv.reader(webpage)
data = []
for row in datareader:
    data.append(row)

C#.NET

The .NET Framework offers a WebClient object which can be used to send web requests to the LabOne WebServer and download LabOne Net Link data. The string with comma separated content can be parsed by splitting the data at comma borders.

using System;
using System.Text;
using System.Net;

namespace ExampleCSV
{
  class Program
  {
    static void Main(string[] args)
    {
      try
      {
        WebClient wc = new WebClient();
        byte[] buffer = wc.DownloadData("http://127.0.0.1:8006/netlink?id=c0p1t6p1cfplotmath&ziSessionId=0");
        String doc = Encoding.ASCII.GetString(buffer);
        // Parse here CSV lines and extract data
        // ...
        Console.WriteLine(doc);
      } catch (Exception e) {
        Console.WriteLine("Caught exception: " + e.Message);
      }
    }
  }
 }

Igor Pro

These instructions are for Igor Pro 6.34A English. The procedure for other versions may differ.

  1. For Igor Pro, the CSV separator has to be the comma. Set this in the LabOne Config tab as follows:

    netlink igor 00
  2. In Igor Pro, select the menu "Data→Load Waves→Load Waves…​".

    netlink igor 01
  3. In the "Load Waves" dialog, click the "File…​" button and paste the link text from the "LabOne Net Link" dialog into the entry field. Then click the "Tweaks…​" button to open the "Load Data Tweaks" dialog.

    netlink igor 02
  4. Adjust values as highlighted below and click "Return". The "Loading Delimited Data" dialog will appear.

    netlink igor 03
  5. Click the "Load" button to read the data.

    netlink igor 04
  6. The data will appear in the Igor Pro main window.

    netlink igor 05

Origin

These instructions are for Origin 9.1 English. The procedure for other versions may differ.

  1. Open the import wizard by clicking on the icon highlighted below.

    netlink origin 00
  2. Ensure that the ASCII button is selected. Click the "…​" button. See screenshot below. The "Import Multiple ASCII" dialog will appear.

    netlink origin 01
  3. Paste the link text from the "LabOne Net Link" dialog into the entry field highlighted below. Then click "Add File(s)" followed by "OK".

    netlink origin 02
  4. Back in the "Import Wizard - Source" dialog click "Finish".

    netlink origin 03
  5. The data will appear in the Origin main window.

    netlink origin 04