CBS took advantage of a strong upfront market, recording volume gains of more than 5% in primetime.

Despite lower ratings and more digital alternatives, media buyers bid up prices for commercials for next season’s shows by 14% to 16%, according to people familiar with the negotiations.

Related: CW Completes Upfront with Prices Up in Mid-Teens Range

CBS did even better in late night, where Stephen Colbert has become the top-rated host. Volume was up as much as 20%, with prices up in the mid-teens.

Stephen Colbert's late night show drew strong upfront demand.

Stephen Colbert's late night show drew strong upfront demand.

CBS also saw an increase in the amount of sports inventory it sold, including its NFL and college football packages. Prices there were up in the mid-single digits.

Digital sales were also up significantly as CBS’s over the top offerings, including CBS All Access drew advertisers.

As expected upstart direct-to-consumer marketers continued to increase their TV spending.

Other strong categories included insurance, financial services, pharmaceuticals and wireless.

Previously, the CW, co-owned by CBS and AT&T, said it had wrapped up its upfront sales.