Skip to main content

Tips for working with CSV files

Use these tips to open, edit, and save CSV files correctly so they import cleanly into your Pickware Admin.

The function for importing and exporting CSV files is helpful when you need to change or create a large amount of data. However, there are a few things to keep in mind when using it – especially when opening, editing, and saving the CSV files.

Below, we show you step by step for Microsoft Excel and LibreOffice Calc what you need to consider so that the CSV file is displayed correctly in your spreadsheet program and can also be imported correctly into your Pickware Admin again.

To find out which data you can export from the Pickware Admin as CSV, see How do I export data from Pickware as CSV?

What is a CSV file and how does it "work"?

A CSV file is a simple text file that stores data in table form. Each row in the file corresponds to a set of data, and the values within a row are separated from each other by semicolons or other characters. Here you can see an example of the content of a CSV file that specifies the absolute stock of a product in different bin locations. The first row specifies the respective column names.

Produktname;Produktnummer;Lager;Lagerkürzel;Lagerplatz;Standardlagerplatz;Bestand
"Aerodynamic Concrete CoffeeMatic";PW10071;Hauptlager;HL;unbekannt;nein;-24
"Aerodynamic Concrete CoffeeMatic";PW10071;Nachfülllager;NL;C-03-006;ja;150
"Aerodynamic Concrete CoffeeMatic";PW10071;Hauptlager;HL;B-02-002;nein;90
"Aerodynamic Concrete CoffeeMatic";PW10071;Hauptlager;HL;C-02-007;ja;50
"Aerodynamic Concrete CoffeeMatic";PW10071;Hauptlager;HL;C-03-004;nein;125

How is a CSV file read and processed?

1. The file is read row by row – so the order of the entries matters. This means that if an entry appears multiple times with different values, the later value overwrites the earlier one. Here is an example:

The last row of the example CSV file from above reads as follows:

"Aerodynamic Concrete CoffeeMatic";PW10071;Hauptlager;HL;C-03-004;nein;125

When this row is read, a stock of 125 is written for product PW10071 in bin location C-03-004 in the main warehouse. Suppose another row followed in the CSV file that refers to the same combination of product number, warehouse, and bin location but contains a different stock value. For example:

"Aerodynamic Concrete CoffeeMatic";PW10071;Hauptlager;HL;C-03-004;nein;100

When this row is read, 100 units would not be added to the 125 units already written. Instead, the stock for product PW10071 in bin location C-03-004 in the main warehouse would be overwritten. The final stock would therefore be 100 units and not 225!

2. Only what is in the file is processed. No independent logical assumptions are made. If you want to move stock from bin location A to bin location B, for example, your CSV file must contain two rows for this.

In this example, as part of an absolute stock import, 90 units of a product are booked to bin location A-01-001 in the first row (absolute stock = 90). In the second row, 90 units of the product are removed from bin location B-02-002 (absolute stock = 0).

Produktname;Produktnummer;Lager;Lagerkürzel;Lagerplatz;Standardlagerplatz;Bestand
"Aerodynamic Concrete CoffeeMatic";PW10071;Hauptlager;HL;A-01-001;nein;90
"Aerodynamic Concrete CoffeeMatic";PW10071;Hauptlager;HL;B-02-002;nein;0

With a relative stock import, the same change would look like this:

Produktname;Produktnummer;Lager;Lagerkürzel;Lagerplatz;Standardlagerplatz;Änderung
"Aerodynamic Concrete CoffeeMatic";PW10071;Hauptlager;HL;A-01-001;nein;90
"Aerodynamic Concrete CoffeeMatic";PW10071;Hauptlager;HL;B-02-002;nein;-90

If the CSV file contains only the first row in each case, stock would only be booked in to the new bin location, but no stock would be booked out of the old bin location. As a result, your actual stock would be 90 units too high.

3. The place where you import determines which data can be changed. For example, in the stock overview, a CSV import only lets you change the stock in the respective bin locations. If you change the product name in the import file, this has no effect on the actual product.

If you specify a bin location that does not exist, it is not created automatically. Instead, the affected record is not imported and an error message appears in the import report. To create bin locations, there is a separate import interface, where, accordingly, stock cannot be changed.

General procedure

Regardless of the program you use, keep the following points in mind when editing the CSV file for the import/export tool:

  • Export the relevant profile as a CSV file from your Pickware Admin and use it as a template.

  • Open the file as a CSV file in a spreadsheet program.

  • Important: the encoding must be UTF-8 and the delimiter must be a semicolon.

  • Finally, the file must be exported or saved again as a semicolon-separated CSV file in UTF-8 format.

CSV import/export with Excel (Excel 2010 and later)

  1. First, run a CSV export with the desired profile in your Admin.

  2. Open a new document in Excel.

  3. Import the CSV file by navigating to the Data tab and clicking Get Data → From Text.

  4. Select Delimited and Unicode (UTF-8) as the file origin, then click Next at the bottom.
    ​

    uft-8-excel_neu.png

  5. Select the semicolon as the delimiter.
    ​

    semikolon2.png

  6. When editing the file, make sure to use the same decimal separator that you configured in the import/export tool. In Excel, you can set the decimal separator via the advanced options.

  7. You can now use the exported file as a template and filter and edit it as needed.

  8. Save the edited file as a CSV file in UTF-8 format.

  9. Finally, import the CSV file into your shop.

CSV import/export with LibreOffice Calc

  1. Open LibreOffice.

  2. Select the CSV file via Open File.

  3. Similar to Excel, a dialog opens where you need to make the settings described above.

  4. Confirm the settings with OK.
    ​

    libreoffice.png

  5. You can use the exported file as a template and filter and edit it as needed. Make sure you use the same decimal separator as in your Admin.

  6. Save the file as a CSV file in UTF-8 format. To do this, select Save As and tick the checkbox for Edit filter settings. Then click Use CSV format and select UTF-8 format again in the dialog that appears.
    ​

    csv_speichern.png

    csv_speichern2.png

What should I do if my spreadsheet program does not support UTF-8 encoding?

If your spreadsheet program does not support valid UTF-8 encoding, you can ensure UTF-8 encoding as follows: Open the edited CSV file in a text editor and save it there as a UTF-8-encoded CSV file. This detour via the editor lets you save the file correctly in UTF-8 format.

For the import in the Admin, the CSV file must be UTF-8 encoded. To be safe, test the import beforehand in a test environment or in the staging system. Before running the import in the live system, it is advisable to create a database backup first.

What should I do if an import fails?

If an import in the Pickware Admin fails or changes more than expected, check these typical causes:

  • Missing permissions: Your role needs the appropriate Detailed privileges for import and export. The role must also be assigned to your user.

Attention: Before the import, remove any columns you do not want to change from the file. For example, if the Stock column is still in the file, the re-import overwrites all stock values that differ from the value in the file.

Did this answer your question?