Knowledge Base

Values from Excel worksheet do not appear in NiceLabel. The database-variables are empty or not formatted properly

Problem

When you have connected an Excel worksheet to the label, sometimes the data from worksheet is not transferred to the variables on the label and they remain empty. Or the data formatting from Excel spreadsheet is not transferred to label variables correctly. This can happen when column in worksheet contains mixed data: some fields are alphanumerical and other numerical.

Microsoft ODBC driver tries to auto-detect the type of data entered in the cells, but sometimes this auto-detection routine fails and data type is wrongly recognized.

Solution

Workaround 1: Reformat the cell types in the spreadsheet to Text format. This approach might not provide the required result. Do the following:

  1. Make sure that all values in the same column are of the same type.
  2. If that is not possible and you need to use mixed data, format the column as Text and not Generic (on the Format menu, click Cells, and select the Text option on the Numbers tab).
  3. The column formatting has to be performed prior the actual data entry.
  4. If the data is already entered, you will have to re-format the values using function TEXT (refer to MS Excel help for proper syntax of this function).

Workaround 2: In this case you will export the data from your Excel spreadsheet into the text file with tab-separated values. You will then import the data into new spreadsheet paying attention to the data type for fields (all fields will be formatted as Text). Do the following:

  1. Open your Excel spreadsheet.
  2. Select the command Save As in the File menu.
  3. For the file type select Text (Tab delimited) (*.txt).
  4. Save the values.
  5. Close the spreadsheet in Excel.
  6. Open the Tab delimited text file you have just created.
  7. Follow on-screen instructions for how to import the data from the text file.
  8. Select the field for which you want to change the formatting.
  9. Change the formatting to Text.
  10. Repeat steps 8-9 until all fields have the required formatting.
  11. Select the command Save As in the File menu.
  12. Save the spreadsheet to Microsoft Excel Workbook (*.xls) format.
  13. Use this Excel workbook as data source for label printing.

More information about this issue can be found in the Microsoft Knowledge Base, article Q141284

Print document   Email document

Feedback

Did this article help you? *