How to: Import from File
Table Of Contents
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_CODE | NACCOUNT_DESC |
|---|---|
| 4000 | Sales type A |
| 4001 | Sales type B |
| 4002 | Sales type C |
| 4009 | Discounts allowed |
| 4200 | Sale of Assets |
| 4400 | Credit charges (late payments) |
| 4900 | Miscellaneous income |
| 4901 | Royalties received |
| 4902 | Commissions received |
| 4903 | Insurance claims |
| 4904 | Rent income |
| 4905 | Distribution & 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
- Open an Accounts screen. For help, see How To: Open an Accounts screen.
- Open:
[ Accounts | Nominal Accounts | Nominal Accounts ] - Press Alt+E or click Edit to enter Edit Mode.
- Select a cell in the Code column.
- Open the Grid Menu to the left of the grid column headings.
- Select Tools, then Import from File.
- Find and select
nominals.csv. - When prompted for the column number to import, enter 1.In this example, column 1 contains the Nominal Account codes.
- Khaos Control asks whether the CSV file contains titles or headers. Choose the appropriate option for your file.Note: The example
nominals.csvincludes column headings, but headings are not required. - When you see:Add new items [Yes] or update existing items [No]?select Yes.
- 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.
- 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 ###.
- Open the Grid Menu.
- Select Tools, then Import from File.
- Select
nominals.csv. - When asked which column to import, enter 2.
- 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.
- Khaos Control updates the descriptions using column 2 of the CSV file, starting from the grid row you selected.
- 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:
- Assign the required stock items to the supplier.
- Export the Supplier Stock grid to CSV.
- 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:
- Open a Stock screen. For help, see How To: Open a Stock screen.
- Open
[ Stock | List ]. - Filter the grid to find the stock items you want to update.
- Green-select the required stock items.
- Right-click in the grid and select Update Selected Stock Items....For more information about the options available, see Update Selected Stock Items....
- Select the supplier you want to assign from the drop-down list.
- Set the Add traffic light to green.
- If required, configure Preferred Supplier and its traffic light.
- 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.
- Open a Supplier screen. For help, see How To: Open a Supplier screen.
- Find and load the required supplier.
- Open:
[ Supplier Summary | Supplier Stock ] - Open the Grid Menu and select Send to Notepad.
- In Export Columns, select Comma Separated.
- Click OK.
- The CSV information is displayed.
- Save the file:
- Select File | Save As.
- Set Save as type to All Files.
- Give the file a
.csvextension, for examplestock.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.
- Open the Supplier screen. For help, see How To: Open a Supplier screen.
- Find and load the required supplier.
- Open:
[ Supplier Summary | Supplier Stock ] - 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.
- Open the Grid Menu.
- Select Tools, then Import from File.
- Find and select the CSV file containing the revised prices.
- 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
- When asked whether the CSV file contains titles, select Yes.Files produced using Send to Notepad in this example contain column headings.
- When you see:Add new items [Yes] or update existing items [No]?select No.
- 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.