Should fix issue #351.
Merge pull request #352 from clearsightstudio/bugfix/issue_351

Only set the `cell_style` once and do it more intelligently