php - Is there a function to lock column from being modified using Maatwebsite/Laravel-Excel? -


i want lock column prevent user edit data of column. maatwebsite/laravel-excel provide feature ?

what have tried,

$sheet->setfreeze('a2'); 

but, doesn't work. method wrong ?

i have used setfreeze() method doesn't work case well.

i have thought problem in different way , here way,

  1. protect whole sheet.
  2. now remove protection areas need writable access. i.e. except a

here code.

$sheet->loadview('template'); $sheet->getprotection()->setpassword('password'); $sheet->getprotection()->setsheet(true); 

now unprotect areas,

$sheet->getstyle('b1:d100')->getprotection()->setlocked(phpexcel_style_protection::protection_unprotected); 

column protected since whole sheet protected, remove protection column b last column.

in case rectangular area b1 d100 editable. can customize according requirement.

hope understand.


Comments

Popular posts from this blog

The SDK directory does not exist (ubuntu 16.04) (react native) -

python - How to clone or copy a list? -

Convert excel to pdf with VBScript -