Extract a bill of quantities into Excel

A BOQ issued as a PDF has to be priced in a spreadsheet. This recovers the grid, including a scanned issue, and writes figures that will multiply and total.

Why a BOQ defeats an ordinary converter

The description column wraps onto three lines while the quantity and rate columns sit on the first, so a naive reader produces three rows where there was one. The item codes are numeric but are not quantities. And the header is almost always two decks deep, with a unit hiding under a rate.

The grid is recovered here from where the words sit and where the white space runs down the page. Rows are grouped by the white inside a row rather than by the column each word starts in, which is what stops a wrapped description from becoming its own item and what keeps a two-word heading over one column.

A header row set in the same face and size as the body is found by a third rule: labels standing over columns of figures is what a header row is. A figure anywhere in the first row settles it the other way.

Numbers that behave like numbers

Quantities and rates are written as numbers so the spreadsheet can multiply them, with Indian grouping read where the document used it. An item code with a leading zero, a long unbroken run of digits and anything carrying a letter stay as text, because a code read as a quantity is worse than a code left alone.

Check the figures against the issued document before pricing from them. A scanned BOQ went through a recogniser, and a recogniser loses a digit out of a long value silently. Priced work is not the place to discover that.

Will the item numbering survive?

Yes, as text, which is what you want. Item codes are never read as quantities.

What about a BOQ with no ruled lines?

Ruled lines are not used at all. The columns come from the white space between the words.

Support and billing: support@gosmartpdf.com. Operated by Mrityunjay Kumar, India. Payments by Dodo Payments, our merchant of record.

Loading the editor…