Rate this F.A.Q.
  How do I setup an ODBC connection to Excel with LABELVIEW?
  Keep in mind that Excel is not a database but a spreadsheet. Any additional items added to the spreadsheet after the ODBC connection has been made will not automatically update the spreadsheet. You will have to repeat steps 1 through 5 to update the spreadsheet.
The following steps will tell you how to format your excel spreadsheet and create your ODBC connection.

  1. Call up the spreadsheet from within Excel.

  2. Click on the cell in the upper left corner of the sheet. Hold the shift key and click on the cell in the bottom right of the spreadsheet (scroll down and to the right if necessary) to select the entire file. Do not select any empty fields or rows.

  3. Go to Insert -> Name -> Define. Enter a name for the database and click OK.

  4. With the cells still highlighted, click on Format -> Cells and choose Text as the category.

  5. Save the spreadsheet and return to the program to access the new file.


These steps are necessary because in Excel - there is no "Table" - so steps 1-3 will create one. Also, since ODBC reads the cell left to right, if the formatting is right justified, it assumes no data is there. Steps 4-5 will left justify all cells.

    To create your ODBC connection, with LABELVIEW open complete the following steps:

  1. Go to Options + Directories + ODBC Data Source.

  2. Choose the Machine Data Source tab.

  3. If the source you wish to use is already present, proceed to step 5.

  4. If the source you need is not listed, click New, and proceed with the following steps.

    • Choose User Data Source + Next.

    • Select the driver for the source file you are using (i.e. Microsoft Access) + Next + Finish.

    • Enter a value for Data Source Name. It does not have to be the same as the source file.

    • The description field is optional, but it can be useful in identifying different data sources.

    • Choose the appropriate button (i.e. Select / Select Workbook) and locate the source file you wish to link too. You may need to uncheck the Use Current Directory option, if present, to find your files.

    • Click OK to complete the procedure.



  5. Make sure the data source you need is highlighted in the Select Data Source window. If it is not, click on it once to select. Click OK to return to the directories menu.

  6. You should see the name of the file you created in the ODBC Data Source box. Click OK to return to designing your label.

  7. Add a field to your label and select ODBC DB as the Data Source. Specify the Key field and Print fields as you would when using any database.

Microsoft is replacing ODBC with OLE DB - however, there will be no driver for Excel in OLE DB - your best bet would be to convert the Excel spreadsheet into an Access database and then use the Microsoft Jet OLE DB Provider in the OLE DB Manager.
Get More Info
Free Demo
Sample Applications
Training Events
Rate this F.A.Q.
Back to LABELVIEW F.A.Q.
Email This Page Email This Page    Printer Friendly Version Printer Friendly Version