Search
 
SCRIPT & CODE EXAMPLE
 

PHP

phpspreadsheet password protected

// Set document security
$helper->log('Set document security');
$spreadsheet->getSecurity()->setLockWindows(true);
$spreadsheet->getSecurity()->setLockStructure(true);
$spreadsheet->getSecurity()->setWorkbookPassword('PhpSpreadsheet');

// Set sheet security
$helper->log('Set sheet security');
$spreadsheet->getActiveSheet()->getProtection()->setPassword('PhpSpreadsheet');
$spreadsheet->getActiveSheet()->getProtection()->setSheet(true); // This should be enabled in order to enable any of the following!
$spreadsheet->getActiveSheet()->getProtection()->setSort(true);
$spreadsheet->getActiveSheet()->getProtection()->setInsertRows(true);
$spreadsheet->getActiveSheet()->getProtection()->setFormatCells(true);
Comment

PREVIOUS NEXT
Code Example
Php :: incorrect format parameter phpmyadmin xampp 
Php :: last day of previous month in php 
Php :: yii2 activeform adding field placeholder 
Php :: cart icon in woocommerce 
Php :: send sms by php diafaan 
Php :: how to add cutom menu option in wordpress 
Php :: wordpress display post comment number 
Php :: string to int laravel 
Php :: select session php 
Php :: wordpress wpdb 
Php :: Call to undefined function mysql_connect() 
Php :: get the last inserted id using laravel eloquent 
Php :: Warning: mysqli_error() expects exactly 1 parameter, 0 
Php :: wp get post thumbnail 
Php :: messed up pagination laravel 
Php :: laravel create migration view 
Php :: wordpress loop 
Php :: php get files in folder 
Php :: php redirect to page 
Php :: check is array laravel 
Php :: to stop XAMPP ubuntu 
Php :: check string in php 
Php :: remove double space php 
Php :: php translate url wpml 
Php :: webstorm vs phpstorm 
Php :: is php the fucking worst 
Php :: how to override default name for apiresourc route in laravel 
Php :: php remove 1 day from date 
Php :: carbon to mysql datetime 
Php :: php mixing 2 string 
ADD CONTENT
Topic
Content
Source link
Name
3+7 =