To solve this optimization problem, we need to define variables and an objective function that maximizes the number of seasonings and spices stored. Let's denote:

- \(x_s\) as the number of small cabinets bought.
- \(x_l\) as the number of large cabinets bought.

The objective is to maximize the total number of seasonings and spices that can be stored, given by \(30x_s + 40x_l\).

We have two main constraints:
1. **Space Constraint**: The total space used by the cabinets cannot exceed 200 sq ft. This gives us \(4x_s + 8x_l \leq 200\).
2. **Budget Constraint**: The total cost of the cabinets cannot exceed $1400. This translates to \(70x_s + 120x_l \leq 1400\).

Both \(x_s\) and \(x_l\) must be non-negative integers since we can't buy a fraction of a cabinet.

Now, let's translate this into Gurobi code in Python:

```python
from gurobipy import *

# Create a model
m = Model("Cabinet_Optimization")

# Define variables
x_s = m.addVar(vtype=GRB.INTEGER, name="small_cabinets")
x_l = m.addVar(vtype=GRB.INTEGER, name="large_cabinets")

# Objective function: Maximize the total number of seasonings and spices stored
m.setObjective(30*x_s + 40*x_l, GRB.MAXIMIZE)

# Constraints
m.addConstr(4*x_s + 8*x_l <= 200, name="space_constraint")
m.addConstr(70*x_s + 120*x_l <= 1400, name="budget_constraint")

# Optimize the model
m.optimize()

# Print results
if m.status == GRB.OPTIMAL:
    print("Optimal solution found:")
    print(f"Buy {x_s.x} small cabinets")
    print(f"Buy {x_l.x} large cabinets")
    print(f"Maximum seasonings and spices that can be stored: {30*x_s.x + 40*x_l.x}")
else:
    print("No optimal solution found. The model is either infeasible or unbounded.")
```