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

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -