Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
3 ratings:
 4 out of 5     Rate this Document

How Can I Use the SQL Toolkit in LabVIEW to Retrieve Data from a Microsoft Excel Spreadsheet?

Primary Software: LabVIEW Toolkits>>Enterprise Connectivity Toolset
Primary Software Version: 3.0
Primary Software Fixed Version: N/A
Secondary Software: N/A

Problem: I have some data that is saved in a Microsoft Excel Spreadsheet and I would like to use the SQL Toolkit to retrieve this information and use it in LabVIEW. How do I do this?

Solution: In Excel you have to define the table by selecting all the data in the spreadsheet and giving the selection a name in the "Name Box", as shown in the attached image. Once you have defined the table, the rest of procedure (i.e., adding the DSN in ODBC) is the same. Note that the first row of cells in the table contains column headings (field names), which is what the SQL Toolkit will assume is in those cells.

Some sample SQL commands that you could use from LabVIEW to access data from the table in the attached image might be:

SELECT * FROM table1
SELECT Name FROM table1 WHERE City='Austin'

Related Links: Product Manuals: SQL Toolkit for G Reference Manual

Attachments:





Report Date: 10/29/1998
Last Updated: 12/02/2004
Document ID: 1ESEJJT0

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit