-
Create Xlsx Files With Past Date Data Validation
Ensure a user is entering a date in the past by coding a data validation in PhpSpreadsheet when creating an xlsx file. The current date, or any date in the future will be denied the entry, securing the cell will only contain values that are dates in the past. Requirements: Composer PHP 7.2 or newer […]
-
Create Xlsx Files With Future Date Data Validation
Using PhpSpreadsheet, restrict user entered values to a future date by coding a data validation on a specific cell which will have settings that will check if a given value is greater than the current date. Add some notes as a reminder to what exact data are only allowed, and also set the error message […]
-
Create Xlsx Files With Cell Data Validation Settings
Take advantage of one of the powerful feature of an xlsx file, the ‘Data Validation’. This will grant the ability to define an input filter on the data that a user can insert in a particular cell. The filter can be a value that must be between a certain start data and specific end data, […]
-
Create Xlsx Files Excluding Certain Cells From Protection
Lock all cells from being edited except specified ones when creating an xlsx file. Code with PhpSpreadsheet to choose which cell data can be updated, and protect all the other cells by ‘locking’ them, refraining protected cell contents from any updates. This provides a wider data protection, an opposite of just selecting which cell to […]
-
Create Xlsx Files With Selected Cell Security Settings
Lock specific cells and forbid it’s data to be updated, choose important cells and protect them by coding selected cells when creating xlsx file in PhpSpreadsheet, preserving it’s value and avoiding any unnecessary or accidental updates. Note: This will NOT prevent the document from opening, it will only hold back the data from being updated. […]
-
Create Xlsx Files With Worksheet Security Settings
Aside from the Document Security Settings, there is another similar security option the can be applied on a worksheet level. This can provide the option to allow sorting, inserting rows, and formatting cells, to name a few. One major difference between the Document Security Settings and this Worksheet Security Settings is, the option to add […]
-
Create Xlsx Files with Document Security Settings
Disallow the possibility of updating the data of an entire spreadsheet document, code this with PhpSpreadsheet and create a new xlsx file. The following options will be deactivated, ‘Text Filters’, ‘Data Sorting’, ‘Clear Contents’, ‘Delete Colum’, ‘Find and Replace’, ‘Text Formulas’, ‘Logical Formulas’, ‘Math Formulas’, and other data-editing options. The option to add a ‘New […]
-
Create Xlsx Files With Auto Filter Settings
Whenever there is a need to group column values or to reorder column contents of a worksheet, or even search a specific column data, coding with the setAutoFilter() function in PhpSpreadsheet comes in handy when creating an xlsx file in Php. Requirements: Composer PHP 7.2 or newer Step 1. Setup dependencies. { “require”: { “phpoffice/phpspreadsheet”: […]
-
Create Xlsx Files With Cell Comments
Code a remark to describe the contents of a cell when creating an xlsx file using PhpSpreadsheet. Certain font style formats can also be set, this includes the font weight, font color, and font style. Requirements: Composer PHP 7.2 or newer Step 1. Setup dependencies. { “require”: { “phpoffice/phpspreadsheet”: “^1.3” } } composer.json Step 2. […]