Office Depot Inc.'s (ODP) third-quarter loss widened amid continued weak sales due to tepid business and consumer spending.

However, analysts found encouraging signs in the company's gross margin improvement, and Office Depot said in its earnings call it had a good back-to-school season.

"The company is still struggling in this environment, but still doing a little bit better than we expected," said Bernstein analyst Colin McGranahan, who has an outperform rating on the stock.

Shares of Office Depot recently declined 3.21% to $5.72.

Like other office supply retailers, Office Depot has been hurt amid the recession as consumers and businesses curb spending and delay big purchases. Office Depot has posted just one profitable quarter over the past seven, though excluding charges, its latest earnings beat Wall Street's expectations.

The Boca Raton, Fla., company and its main rivals, Staples Inc. (SPLS) and OfficeMax Inc. (OMX), are also facing increased competition from discounters looking to steal business with lower prices.

Despite continued sales declines, Chief Executive Officer Steve Odland said in the earnings call he's "feeling better about North American retail right now," noting Office Depot is beginning to see improving trends in many parts of the country. California continues to be a difficult market, however.

"We are pleased that we exceeded our operating earnings and cash flow expectations in the third quarter and we are encouraged by the progress that we have made on strategic initiatives," Odland said in the call. "The fourth quarter will be challenging but we are excited about the prospects for our back to business season in the first quarter of 2010."

For the third quarter, Office Depot reported a loss of $398 million, or $1.51 a share, compared with a year-earlier loss of $6.7 million, or a 2 cents a share.

Adjusted for various tax-related items recognized in the first half of the year and other charges related to previously announced restructuring actions, the company reported a loss of $21 million, or 8 cents a share, compared to a loss of $2 million, or a penny a share, in the prior-year period.

Sales dropped 17% to $3 billion, with North American same-store sales down 14%.

Analysts polled by Thomson Reuters expected a per-share loss of 10 cents on revenue of $3.1 billion.

Gross margin rose to 28.4% from 28%.

Earlier this year, Office Depot received a $350 million investment from a private-equity firm, helping the struggling retailer weather the economic downturn. But the deal came at a steep price, as BC Partners could own a 20% stake in the company and won three seats on Office Depot's board.

The company's North American retail division reported a 192% boost in operating profit, helped in part by the closure of underperforming stores and reduced operating expenses.

However, sales for the division fell 18% to $1.3 billion, due in part to having 117 fewer stores open in the quarter versus the year-ago period.

In Office Depot's international division, profit fell 5.6%, as sales dipped 16% to $861 million. Excluding foreign-exchange effects, sales fell 9%.

Office Depot closed one store, opened one store and relocated three stores during the quarter. The company operated 1,158 stores as of September 26.

-By Kelly Nolan; Dow Jones Newswires; 212-416-2167; kelly.nolan@dowjones.com