2016-10-06 12:47
浏览 427

是否可以使用Laravel Excel为整列添加边框?

With Laravel Excel, it's easy to add a border to a cell:

$sheet->cell('A1', function($cell) {
    $cell->setBorder('none', 'none', 'thin', 'none')

It's easy to add a border to a row too:

$sheet->row(3, function($row) {
    $row->setBorder('none', 'none', 'thin', 'none')

But I did not found anything about column (maybe I did not search well). Is it possible to add a border (or some other style) to a whole column?

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • dse3168 2016-10-07 14:25

    You can do like this i think:


    This will set border to cells from A1 to A10. so you need to know the length of your column i guess.

    点赞 评论

相关推荐 更多相似问题