Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
$range="A1:J10"; $sheet->setBorder($range);
但这样,服务器给出错误
您可以使用以下代码解决您的问题:
$range = "A1:J10"; $sheet->setBorder($range, 'thin');
或者你可以使用这个:
$range = "A1:J10"; $sheet->cells($range, function($cells) { $cells->setBorder('thin', 'thin', 'thin', 'thin'); });