Step 10

Importing Classifications from Excel

Code your products from a spreadsheet: a Nielsen or Circana attribute report, or a supplier's or retailer's product list. Spanner matches each row to a product on a code they share, and writes the columns you choose into your classifications.

When to use it

Spanner has three ways to fill in classifications. They suit different jobs.

WayUse it for
The Product Coding reportA handful of corrections, or one column pasted from Excel, with the products in front of you. See Editing product coding.
Import Classifications from ExcelA coding file for many products, matched on a code, that you may receive again next month. This guide.
A product libraryCoding that comes with dimensions, pack sizes and images, kept for every document you make. See Using a Product Library.

The import changes products that are already in your document. It does not add products, and it does not add classifications.

This guide is for Spanner 2.5.1.2 and later. Earlier versions have the same window, but treat blank cells and saved imports differently; where it matters, the guide says so.

Before you start

Check four things first. Most imports that go wrong fail on one of them.

  • The file is an Excel workbook, .xlsx. If you have a .csv or an older .xls file, open it in Excel and save it as .xlsx. Then close it in Excel, as Spanner may not be able to read a workbook that Excel has open.
  • One row for each product, under a row of headings. The headings needn't be on the first row: you tell Spanner which row they're on, and everything above it is ignored.
  • One column holds a code that Spanner also has for the product: its ID, its barcode, or a code you keep in a classification. Rows are matched on it. See Matching the codes.
  • The classifications are already in your document. If the file has a Flavour column and your document has no Flavour classification, add it first in the Document Editor (Edit › Edit Document).

The document needs products in it too. Until it has some, the menu doesn't show the import.

The import window

  1. Choose Interface › Import Classifications from Excel and pick the file. The Classifications Import window opens, showing the first sheet as it is in Excel.
  2. Sheet: choose the sheet your data is on.
  3. Header Row: type the number of the row that holds the headings. That row is tinted yellow, so you can see you have the right one.
  4. Excel Match: choose the column that holds the code. Each column is listed by its letter and its heading, such as Column C : Barcode Value.
  5. The transform, the list to the right of Excel Match: leave it at No Transform unless the codes need tidying before they'll match. See Matching the codes.
  6. Spanner Match: choose what the code is in Spanner. It starts at Product ID.
  7. Import from, Import to: on the right is a line for every other column in the file. Beside each one you want, choose where it goes. Leave the rest empty; they're ignored. The red cross clears a choice.
  8. Click Import. A message tells you how many products changed, and the window stays open in case you want to import something else from the same file.
The Interface menu with Import Classifications from Excel highlighted, and Saved Classifications Import below it
Import Classifications from Excel, on the Interface menu. Saved Classifications Import is just below it.
The Classifications Import window. On the left, the sheet with row 4, the headings, tinted yellow. Along the top, Sheet, Header Row 4, Excel Match set to Column C : Barcode Value, the transform and Spanner Match. On the right, the Import from and Import to lists, with Category, Manufacturer and Brand given classifications and the list open on Size
The import window. Row 4 holds the headings, the barcode column is the match, and three columns have been given somewhere to go. The list is open to choose a classification for Size.
The bottom right of the import window: a small save icon on the left and the Import button in the middle
Below the lists, at the bottom right of the window: the save icon, and the Import button.

Where a column can go

The Import to list has every classification in your document, and four other places:

Import toWhat it does
A classificationWrites the cell's value into that classification.
Product NameRenames the product.
UPC CodeSets the product's barcode.
Image Override CodeSets the image name Spanner uses for the product's pictures, in place of the usual lookup.
MatchesAdds the cell's code to the product's other codes, such as a retailer's code. Codes are only ever added, never removed.
The Import button appears when there is something to import: an Excel Match column chosen, and at least one other column given somewhere to go. If you can't see it, one of those is missing.

Matching the codes

A row is matched to a product when the code in the file is exactly the same as the code in Spanner: every character, capital letters included. Barcodes are where this most often goes wrong, because the same barcode can be written several ways, and Excel drops the zeros from the front of a number.

So before you import, look at a few codes in the window and the same products in Spanner, and compare them. Then set the three match boxes from this table.

The file hasTransformSpanner Match
The same codes as your product IDsNo TransformProduct ID
Barcodes, whatever their lengths, and whether or not some have lost their leading zeros, such as 50213085 where Spanner has 0000050213085Change to 13 Digit FormatUPC Code As 13 Digit Format
Barcodes without their last digit, the check digit: 12 digits where Spanner has 13Add Check DigitUPC Code
The barcode inside the description, such as 5000112637922 Brand A Cola 330mlUPC in Product NameUPC Code As 8 / 13 Format
Circana's own product code, its medium code, instead of a barcodeChange Circana Medium Name to UPCUPC Code As 8 / 13 Format
A retailer's code that you keep in a classificationNo TransformThat classification
Only the product's name, spelt exactly as in SpannerNo TransformProduct Name

The transform changes the codes from the file, and Spanner Match says which form of Spanner's code to compare them with. Neither changes anything in your document: they are only used to find the product.

For barcodes, the second row is the one to try first. It writes both sides as 13 digits, adding zeros to the front of shorter ones, so 8, 12 and 13 digit forms of the same barcode all agree. Change to 8/13 Digit Format with UPC Code As 8 / 13 Format does the same job with short barcodes kept at 8 digits, and UPC Code with Leading Zeros Removed matches a file whose zeros have gone without changing the file's codes at all.

Spanner reads what Excel stores, not what it shows. A barcode that Excel displays as 5.00011E+12 is read in full. Zeros that Excel has dropped from the front of a number are gone, though, which is what the 13 digit format puts right.

If the first try matches nothing, nothing has changed in your document. Try the next most likely row of the table. If it matches only some products, see Problems.

The Excel Match list open, showing each column by letter and heading, from Column A to Column I, with Column C : Barcode Value highlighted
Excel Match: the column in the file that holds the code.
The transform list open, showing No Transform, Change to 13 Digit Format, Change to 8/13 Digit Format, Add Check Digit, Change Circana Medium Name to UPC and UPC in Product Name
The transform: how the file's codes are tidied before they are compared.
The Spanner Match list open, showing Product ID, UPC Code, UPC Code As 13 Digit Format, UPC Code As 8 / 13 Format, UPC Code with Leading Zeros Removed, Product Name, Image Override Code, and then the document's classifications
Spanner Match: what the code is in Spanner. Below the seven standard choices are the document's own classifications.

What gets changed

For every column you gave somewhere to go, the file is the master. Each matched product ends up with what its row says.

In the fileWhat happens
A cell with a valueReplaces the product's value, if it is different.
A blank cellEmpties the product's value. This applies to classifications, Product Name, UPC Code and Image Override Code. A blank under Matches changes nothing.
A row whose code matches no productIgnored. The import doesn't add products.
A row with no codeIgnored.
Two rows with the same codeThe lower row is used.
A code that several products shareEvery one of them is changed.
A product that is not in the fileLeft as it is.
Blank cells empty what you had. If a report has a Flavour for most products but not all, importing its Flavour column removes the flavours you typed in for the rest. Give a column somewhere to go only if you want the whole column to win. Earlier versions of Spanner left some blanks alone, depending on where they were in the row; from 2.5.1.2 a blank always empties the value.

The message afterwards

When the import finishes, a message gives up to three counts:

  • Products Changed: how many products had at least one value changed.
  • Changes: how many values changed altogether. Values that were already the same are not counted.
  • Values Changed to Blank: how many of those changes emptied a value. The line is only there when some did. If the number surprises you, undo the import and look at the file.

It doesn't say how many rows found no product. To check, open the Product Coding report afterwards and look for products that are still empty.

Three more things to know

  • Numbers and dates come as Excel stores them. A date arrives as a number such as 45992, and 25% as 0.25. If a column should come in as you see it, make it text in Excel first.
  • Calculated classifications are skipped. A classification that works its values out from a formula is in the Import to list, but nothing is imported into it.
  • The whole import is one step to undo. Edit › Undo puts every value back as it was.
The message after an import: Products Changed: 55, Changes: 220
55 products changed, with 220 values between them. No value was emptied, so there is no third line.

Saving and running again

If you'll receive the same file again, save the import once and run it from the menu after that.

  1. Set the window up and check the import works.
  2. Click the small save icon, at the bottom of the window to the left of the Import button.
  3. Give it a name, such as Circana attributes, and click the green tick. A name you've used before asks whether to replace the old one.
The Save to Settings box, asking for a Classifications Import name to save by, with a green tick to save and a red cross to cancel
Naming the import. The green tick saves it.

The saved import remembers the file and where it is, the sheet, the header row, the three match boxes, and where each column goes. It appears under Interface › Saved Classifications Import, a menu that is only there once you have saved one.

Running a saved import

Put the new file where the old one was, with the same name, and choose the import from the menu. If everything is found, it runs straight away and shows the message, without opening the window.

IfSpanner
The file isn't where it wasAsks you for it, starting in the folder it used to be in. The saved import keeps the old place.
The sheet isn't in the fileUses the only sheet, or asks you which one.
A heading is missing from the fileLeaves that column out and imports the rest.
A classification is missing from the documentLeaves that column out and imports the rest.
The code's heading is missing from the file, the Spanner Match classification is missing from the document, or nothing was changedOpens the window, set up as far as it could be, so you can see why.

Headings are found by their text, not their column. So the report's columns can move about from month to month, as long as their headings stay the same.

Changing a saved import

Saved imports are listed in Tools › Settings, under Saved Classifications Import. Each has a row: its Name, File, Sheet, Header Row Number, Excel Match, Transform and Spanner Match, and the number of columns it maps. The ... button opens the list of columns, as pairs of Excel heading and Spanner classification. The arrows change the order on the menu, the red cross deletes an import, and the green plus adds one.

Two columns read a little differently from the window. Transform has shorter names, so the window's Change to 13 Digit Format is 13 Digit UPC Code here. Spanner Match is shown by its short name: ID, UPC, UPC13, UPC813, UPCTrimLeading0, Name, ImageOverride, or the heading of a classification.

Imports saved before 2.5.1.2 that match on a classification show a number here in place of the heading: the classification's place in the document it was saved from, counting from 0. Such an import picks the wrong classification in a document whose classifications are in a different order. Type the heading over the number, or save the import again from the window.
Saved Classifications Import in Settings: a row for each of two saved imports, with columns Name, File, Sheet, Header Row Number, Excel Match, Transform, Spanner Match and Mapped, then a button with three dots, arrows, a red cross and a green plus
Two saved imports in Settings. The first finds its file under each user's own folder; the second matches on barcodes written as 13 digits and maps six columns.

Sharing with colleagues

A saved import is part of your own Spanner settings. To give it to a colleague, save your settings to a file with only Saved Excel Classifications Import ticked, and have them add it to theirs. Sharing Tables shows the buttons; it works the same way for imports.

For a shared import to find the file on each person's computer, start its File with %userprofile% in place of your own folder, for example %userprofile%\OneDrive - Organisation Name\Coding\Circana Attributes.xlsx. Spanner puts in each user's own folder when it runs.

Ask Spanner AI

Spanner AI can do the whole import for you. It looks at the file, compares its codes with your products to choose the match, adds any classification the document doesn't have yet, and runs the import. Afterwards it tells you how many of the file's codes found a product, shows a few that didn't, and says how many values were emptied by blank cells.

For example, ask:
  • "Look at this Circana report and tell me which column matches my products."
  • "Import the brand, flavour and pack size from it, matching on barcode."
  • "How many of the file's codes found a product, and which didn't?"
  • "Save that import as Circana attributes, so I can run it next month."
  • "Run my Circana attributes import on this document."

Because a blank cell empties a value, it's worth asking Spanner AI to check a column for blanks before it imports over coding you already have. Everything it imports can be undone in one step, in the same way.

Spanner's AI Chat window. The request reads: please import classifications from my coding sheet. The reply says 55 of 55 products were matched on the 13 digit barcode, lists six classifications filled with examples of their values, marks four as added to the document, and says the import was saved as Canned Ale Coding
One request: the file found and matched, four classifications added, six filled in, and the import saved to run again.

Problems

You seeBecause, and what to do
No Import buttonNo Excel Match column is chosen, or no other column has been given somewhere to go.
The headings in the lists are product dataHeader Row is on the wrong row. Type the number of the row with the headings.
A classification isn't in the Import to listIt isn't in the document. Close the window, add it in the Document Editor, and start again.
No Product MatchesNo code in the file is the same as any product's. Compare a few, then try another row of the table in Matching the codes. Look for spaces around the codes in Excel too.
No Product DataNo product has anything in the field chosen as Spanner Match, such as UPC Code in a document without barcodes. Choose a field your products do have.
No Update DataNo row below the header row has a code in the Excel Match column. Check the Header Row and the Excel Match column.
No ChangesThe rows matched, and every value was already the same. You'll also see this if the only columns you chose go to calculated classifications.
Only some products changedThe others have codes written another way, often a different length of barcode. Run the import again with another transform: the products already done stay done.
Values have disappearedThe file had blank cells in a column you imported. Undo, then either fill the blanks in Excel or leave that column out.
A date came in as a numberThat is how Excel stores it. Undo, make the column text in Excel, and import again.
A saved import opens the windowIt couldn't find the code's heading in the file, or it ran and changed nothing. The window shows what it found.
An error, or nothing at all, when you pick the fileThe workbook is probably open in Excel. Close it there and try again.

Once your products are coded, write them to your product library so the coding is there for the next document: see Using a Product Library.

Coding a whole category?

If you have several sources to bring together, or a report that won't match, we can set the imports up with you.

Email us Book a Demo