How to: Import from File

The CSV grid import feature in Khaos Control lets you import a column of data from a CSV file directly into many editable grids. There is no fixed CSV layout. Instead, you choose which column in the CSV file should be imported into the selected Khaos Control grid column. 

This article covers two common examples:
  • Importing Nominal Accounts.
  • Updating Customer or Supplier Price Lists.
WARNING: Make sure the grid and CSV file use exactly the same row order when updating existing information. Khaos Control does not match records during this type of import. It processes the rows sequentially in the order they appear in the CSV file. An incorrect sort order could therefore update the wrong records. 

Importing Nominal Accounts

This example uses a CSV file called nominals.csv containing Nominal Account codes and descriptions.
For example:

NACCOUNT_CODENACCOUNT_DESC
4000Sales type A
4001Sales type B
4002Sales type C
4009Discounts allowed
4200Sale of Assets
4400Credit charges (late payments)
4900Miscellaneous income
4901Royalties received
4902Commissions received
4903Insurance claims
4904Rent income
4905Distribution & carriage

You first import the codes to create the Nominal Accounts, then import their descriptions into those records. [servicedes...ontrol.com]

Import the Nominal Codes

  1. Open an Accounts screen. For help, see How To: Open an Accounts screen.
  2. Open:
    [ Accounts | Nominal Accounts | Nominal Accounts ]
  3. Press Alt+E or click Edit to enter Edit Mode.
  4. Select a cell in the Code column.
  5. Open the Grid Menu to the left of the grid column headings.
  6. Select Tools, then Import from File.
  7. Find and select nominals.csv.
  8. When prompted for the column number to import, enter 1.
    In this example, column 1 contains the Nominal Account codes.
  9. Khaos Control asks whether the CSV file contains titles or headers. Choose the appropriate option for your file.
    Note: The example nominals.csv includes column headings, but headings are not required.
  10. When you see:
    Add new items [Yes] or update existing items [No]?
    select Yes.
  11. Khaos Control creates a new Nominal Account for each row in the CSV file and adds the values from column 1 to the Code column. 

Import the Nominal Descriptions

Now import column 2 of the same file to update the descriptions of the Nominal Accounts you have just created.
  1. Select the Description cell on the first Nominal Account you imported.
    Note: At this point, the description is likely to show a default value such as Nominal Account ###.
  2. Open the Grid Menu.
  3. Select Tools, then Import from File.
  4. Select nominals.csv.
  5. When asked which column to import, enter 2.
  6. When you see:
    Add new items [Yes] or update existing items [No]?
    select No.
    This tells Khaos Control to update the existing rows rather than create new ones.
  7. Khaos Control updates the descriptions using column 2 of the CSV file, starting from the grid row you selected.
  8. Press Ctrl+S or click Save. 

Importing Customer or Supplier Price Lists

The same CSV grid import process can be used with editable Customer and Supplier grid columns.
The following example updates a supplier's Buy Price, but you can use the same approach for other editable columns, such as Supplier Ref. 
The process has three stages:
  1. Assign the required stock items to the supplier.
  2. Export the Supplier Stock grid to CSV.
  3. Update the CSV and import the revised values back into Khaos Control.

Assign Stock Items to a Supplier

Before exporting a Supplier Price List, make sure the relevant stock items are assigned to that supplier.
For a large number of stock items, you can update them together:
  1. Open a Stock screen. For help, see How To: Open a Stock screen.
  2. Open [ Stock | List ].
  3. Filter the grid to find the stock items you want to update.
  4. Green-select the required stock items.
  5. Right-click in the grid and select Update Selected Stock Items....
    For more information about the options available, see Update Selected Stock Items....
  6. Select the supplier you want to assign from the drop-down list.
  7. Set the Add traffic light to green.
  8. If required, configure Preferred Supplier and its traffic light.
  9. Click OK to apply the changes. 

Export the Supplier Prices to CSV

Once the stock items are assigned to the supplier, export the Supplier Stock grid.
  1. Open a Supplier screen. For help, see How To: Open a Supplier screen.
  2. Find and load the required supplier.
  3. Open:
    [ Supplier Summary | Supplier Stock ]
  4. Open the Grid Menu and select Send to Notepad.
  5. In Export Columns, select Comma Separated.
  6. Click OK.
  7. The CSV information is displayed.
  8. Save the file:
    1. Select File | Save As.
    2. Set Save as type to All Files.
    3. Give the file a .csv extension, for example stock.csv.
The CSV file can now be opened in Excel or a similar application. For example, you could send the file to your supplier so that they can update prices or supplier references and return the revised file to you.
WARNING: Do not change the order of the rows in the CSV file. Khaos Control imports each row sequentially. It does not use stock codes or another identifier to match the CSV rows with the corresponding grid rows. 

Import Revised Supplier Prices

Once the prices have been updated in the CSV file, you can import them back into Khaos Control.
  1. Open the Supplier screen. For help, see How To: Open a Supplier screen.
  2. Find and load the required supplier.
  3. Open:
    [ Supplier Summary | Supplier Stock ]
  4. Select the Buy Price cell on the first row of the grid.
    Important: Check that the rows in the grid are in exactly the same order as the rows in the CSV file before continuing.
  5. Open the Grid Menu.
  6. Select Tools, then Import from File.
  7. Find and select the CSV file containing the revised prices.
  8. Enter the column number containing the values you want to import.
    For a CSV exported using the example above, Buy Price is column 3, so enter:
    3
  9. When asked whether the CSV file contains titles, select Yes.
    Files produced using Send to Notepad in this example contain column headings.
  10. When you see:
    Add new items [Yes] or update existing items [No]?
    select No.
  11. Khaos Control updates the Buy Price values using column 3 of the CSV file. 

Important Considerations

The grid import is deliberately flexible, but this also means you need to take care when using it.
  • Check the row order before importing. There is no record matching during a grid import.
  • Select the correct starting row. When updating existing records, imported values are applied sequentially from the row you have selected. 
  • Select the correct CSV column. The import works on one chosen column of data at a time. 
  • Check whether your file contains headers. Khaos Control asks this during the import so the heading row can be handled correctly. 
  • Use Edit Mode where required. Some Khaos Control grids are read-only until you enter Edit Mode, and only editable grid columns can be changed. Item Grids
Tip: Because an incorrectly ordered CSV could update the wrong records, consider testing substantial imports in your TESTING database first. Khaos Control recommends testing and backing up data before other potentially significant import processes, such as customer imports. 

Did you find this article helpful?