[en] Values from Excel worksheet do not appear in NiceLabel software. The database variables are empty or not formatted properly

La traduction officielle n'est pas encore disponible.

[en] Problem

[en] When you connect an Excel worksheet to your solution, sometimes data from the worksheet does not transfer to the variables on the label. Variables remain empty. Or the data formatting from an Excel spreadsheet is not transferred to label variables correctly. This can happen when a column in the worksheet contains mixed data: some fields are alphanumerical and others numerical.

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

[en] Solution

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

  1. [en] Make sure that all values in the same column are of the same type.

  2. [en] If that is not possible and you use mixed data, format the column as Text and not General. In the Cells menu, click Format, and select the Text option on the Numbers tab.

  3. [en] Perform the column formatting prior to the actual data entry.

  4. [en] 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).

[en] Workaround 2: Export the data from your Excel spreadsheet into the text file with tab-separated values. Then import the data into a new spreadsheet as Text format.

  1. [en] Open your Excel spreadsheet.

  2. [en] Select the command Save As in the File menu.

  3. [en] For the file type select Text (Tab delimited) (*.txt).

  4. [en] Save the file.

  5. [en] Close the spreadsheet in Excel.

  6. [en] Open your Tab-delimited text file in Excel.

  7. [en] Follow on-screen instructions on how to import the data from the text file.

  8. [en] Select the field for which you want to change the formatting.

  9. [en] Change the formatting to Text.

  10. [en] Repeat steps 8-9 until all fields have the required formatting.

  11. [en] Select the command Save As in the File menu.

  12. [en] Save the spreadsheet to Microsoft Excel Workbook (*.xls) format.

  13. [en] Use this Excel workbook as your data source for label printing.