我是Apache POI库的初学者.
在VBA中,我知道我可以使用以下代码选择并加粗整个工作表
Dim ws As Worksheet
Set ws = ThisWorkbook.Sheets(1)
ws.Cells.Font.Bold = True
Run Code Online (Sandbox Code Playgroud)
我是否可以通过使用Apache POI库进行编码来了解如何选择和加粗整个工作表?
谢谢
以下是我在Laravel 5.2中实现主 - 详细信息页面的两个模型,刀片页面和控制器.我想知道如何将详细信息部分更新回数据库.
1)主模型
namespace App;
use Illuminate\Database\Eloquent\Model;
class Order extends Model
{
protected $fillable = [
'id',
'name',
'created_at',
'updated_at'
];
public function detail()
{
return $this->hasMany('App\OrderDetail','fid','id');
}
public function getDetailCountAttribute()
{
return $this->hasMany('App\OrderDetail','fid','id')->count();
}
public static function boot()
{
parent::boot();
// cause a delete of a product to cascade to children so they are also deleted
static::deleted(function($order)
{
$order->detail()->delete();
});
}
}
Run Code Online (Sandbox Code Playgroud)
2)细节模型
namespace App;
use Illuminate\Database\Eloquent\Model;
class OrderDetail extends Model
{
protected $fillable = [
'id', …Run Code Online (Sandbox Code Playgroud)