Excel import contract

The bulk table imports rows into a menu type. This page documents exactly what it does, so integrations and scripted preparation can rely on it.

Column mapping

Columns map by position, in the order the on-screen table presents them. Heading text is not read.

Menu type Column order
a_la_carte_menu, terrace_menu, breakfast, desserts, bar_menu Title · precio-racion-completa · precio-media-racion · precio-unidad
cocktails Title · precio-copa
beverages Title · precio-copa · precio-chupito · precio-botella
wine_list Import: Title · precio-copa · precio-botella · precio-botella-magnum · precio-botella-benjamin; export also includes parker_score and penin_score

tasting_menu and set_menu have no bulk table.

Matching

Rows are matched by exact title within the post type. The lookup:

  • compares the sanitized, trimmed title;
  • is case-sensitive and accent-sensitive;
  • does not filter by post status, so a draft with the same title can be the match;
  • resolves to the lowest post ID when several posts share a title.

A matched row updates that post. An unmatched row creates a new one.

What a create does

Property Value
post_status publish
menu_order The next position after the current maximum for that post type
Meta The non-empty price cells
Category The batch's selected term, if any

What an update does

Property Behavior
Price meta Written only for cells that contain a value
Empty cells Skipped — an existing value is never blanked
Category Set to the batch's selected term, if any
menu_order Moved to the end of the order
Status, text, images, allergens Untouched

The category

One category applies to the whole batch, chosen before saving. There is no per-row category column, and the export's category column is not read back.

Because the category is applied to matched rows too, an import can move items between sections — deliberately or by accident.

Rows that are skipped

  • Rows with an empty title.
  • Non-array rows.

The result

The operation reports counts:

Process complete. N new items created, M items updated.

Those counts are the primary verification signal. For a pure update batch, a non-zero created count means titles did not match.

Side effects suppressed during import

Bulk saves run in a mode that skips edit-screen behaviors:

  • the automatic featured-image detection from the gallery;
  • the automatic category assignment applied when publishing without a category.

That is why an import with no category selected leaves items uncategorised rather than filing them into an arbitrary first category.

Export columns

The export adds a trailing category column listing the item's categories, and is produced in the site's main language. Columns otherwise match the table above.

Guidance for scripted preparation

  • Build titles from an export, never by retyping.
  • Normalise trailing spaces, quote characters and accents before import.
  • Keep vintages out of wine titles; the title is the matching key.
  • Emit plain price values; formatting travels with the cell.
  • Emit empty cells for formats that are not offered.
  • Import one category per batch.
  • Verify by comparing exports taken before and after.