Does this site look plain?

This site uses advanced css techniques

[Payroll Report] A customer in the payroll business acquired another payroll practice, but the new company's payroll software had no "data export" facility. The best they could do was a "print to file", and the printer supported was the HP LaserJet. This output was full of escape codes, and my customer's programmer deemed these files unparsable in C.

My customer was faced with an enormous and error-prone manual data entry process, and the end of the quarter was fast appraching, and it looked like an ugly problem. A scanned image of a sample page is to the right - click for a larger copy.

My customer forwarded a handful of these files to me, and I was able to see the patterns among the escape codes that would allow me to extract the key data and convert into a form that would be readable by the existing software. I've written a fair amount of PCL parsing code in perl previously, and was able to reuse it to allow detection of the employee names, address, individual weekly pay amounts, and totals.

It was imperative that the individual totals presented in the output file actually tie to the totals in the report itself: we had no other way to know that we had properly extracted the per-employee data. This automated double-check proved invaluable, as a few of the print files had unusual exceptions from the formats seen to date.

The output file was in a tab-delimited format, and this was reported to have been very easy to import into the existing payroll system:

# Page 1
CLIENT	1234	ANY COMPANY, INC.

EMPL	100	123-45-6789	SMITH	BILL	01/01/2001	12/31/2001	01	M-6	CA	1421.54
EADDR	100	TUSTIN	CA	 92782	1234 MAIN STREET
ETOTS	100	SALARY	2843.08
ETOTS	100	TXBL. WAGES	2843.08
ETOTS	100	FICA	217.50
ETOTS	100	SDI	25.58
ETOTS	100	NET PAY	2600.00

EMPL	200	987-65-4321	JONES	SAM	01/01/2001		01	M-5	CA	4000.00
EADDR	200	TUSTIN	CA	 92780	4321 MAPLE AVENUE
ETOTS	200	SALARY	8000.00
ETOTS	200	TXBL. WAGES	8000.00
ETOTS	200	FED	563.76
ETOTS	200	FICA	612.00
ETOTS	200	STATE	104.70
ETOTS	200	SDI	72.00
ETOTS	200	NET PAY	6647.54

We processed approximately one hundred of these files representing several thousand employees, and the customer was delighted at the speed, accuracy, and timeliness of the results.