ONLYOFFICE Spreadsheet Editor · Analysis and modeling · Intermediate
Solve a constrained model and validate Solver results in ONLYOFFICE
Solve a constrained model and validate Solver results.
Documentation reviewed; native checks remain manual · Editorial standards
Quick answer
Build a formula objective, continuous variable cells and linear constraints, then use Data > Solver with Simplex LP. Check the returned values against every constraint and an independent calculation before keeping the solution. A success message alone is not a model audit.
Scope and model
Solver was added in ONLYOFFICE Desktop Editors 9.3.0; this guide targets the English 10.0.0 desktop interface. The documented implementation supports continuous linear problems only. Integer, binary and differential constraints are not supported. Use divisible resource quantities, such as hours allocated to two services, not an order that must contain whole indivisible units.
We want to maximize contribution 30x + 20y under two capacity limits: 2x + y ≤ 100 and x + y ≤ 80, with x and y non-negative. In a new XLSX workbook enter:
| Cell | Label or entry |
|---|---|
| A2 | Service X hours |
| B2 | 0 |
| A3 | Service Y hours |
| B3 | 0 |
| A5 | Contribution |
| B5 | =30*B2+20*B3 |
| A7 | Resource used |
| B7 | =2*B2+B3 |
| C7 | 100 |
| A8 | Hours used |
| B8 | =B2+B3 |
| C8 | 80 |
B2:B3 are variables. B5 is the objective. B7:B8 calculate usage; C7:C8 hold the corresponding limits. Keeping limits in cells makes a changed-capacity scenario easier to inspect.
Configure Solver
- Open Data > Solver. Set objective to B5 and choose Max.
- Set By changing variable cell to B2:B3. Do not include B5 or the constraint formulas: Solver should change inputs, not overwrite calculations.
- Under Subject to the constraints, choose Add. Set Cell reference to B7, operator to <=, and Constraint to C7. Confirm the constraint.
- Add B8 <= C8 in the same way.
- Enable Make unconstrained variables non-negative and use Simplex LP as the solving method.
- Click Solve. In Solver results, inspect the proposed values in the worksheet before choosing keep solver solution. If the model was entered incorrectly, restore original values instead.
Validate the optimum independently
The expected optimum is x=20 and y=60. Contribution is 30×20 + 20×60 = 1,800. Resource use is 2×20 + 60 = 100; hours use is 20 + 60 = 80. Both constraints are exactly met, with zero remaining capacity, and neither input is negative.
For this two-variable linear model, compare the feasible corner points: (0,0), (50,0), (20,60) and (0,80) produce contributions 0, 1,500, 1,800 and 1,600. That confirms why 1,800 is the maximum rather than merely a feasible value. Small numerical residuals should be inspected with suitable displayed precision; do not round an infeasible result into apparent compliance.
Change a limit and troubleshoot
Change C8 from 80 to 70 and solve again using the same cell-based constraint. The new expected result is x=30, y=40 and contribution 1,700. Resource use remains 100 and hours use becomes 70. Compare this with the old solution: (20,60) would now exceed the hours limit by 10, so retaining it would be wrong.
If Solver reports no useful solution, verify that the objective is a formula, the correct input cells are variable, and the inequality directions and bounds are correct. Products of two variables, powers of variables or conditional branching do not become linear simply because they are written in cells. Do not add imagined integer options or round a continuous solution to satisfy an unsupported whole-unit requirement.
Save the workbook with the input, formula and capacity cells visible. Keep a separate baseline copy if you need to compare scenarios later. For a single input adjusted to hit one target instead of constrained optimization, see Goal Seek.
Sources and verification
Official documentation snapshots retrieved on 20 October 2026 support the procedures above. The worked checks are independently reasoned expectations, not a report of native application testing. Save/reopen, rendering and platform behavior remain checks for the stated installation.