Issue
How can I add default dropdown in excel sheet using PHPExcel when user add a new row example available for individual cell not for a column or multiple columns. Example of Excel Template
SL No. | First Name | Middle Name | Last Name | Class | Sec | DOB | Father Name | Selected
Class and Sec require dropdown. Hence when a new student record is added class and sec column should have dropdown. Is it possible through PHPExcel.
If someone could provide a tutorial or something, that would be a real help.
Regards
Solution
This is called an autoFilter, and there's an entire document in the /Documentation
folder describing how to set this up - PHPExcel AutoFilter Reference developer documentation
At its simplest, you simply define the entire worksheet as an autofilter area using:
$objPHPExcel->getActiveSheet()->setAutoFilter('A1:I20');
(assuming that 20 is the last row in the worksheet)
or
$objPHPExcel->getActiveSheet()->setAutoFilter(
$objPHPExcel->getActiveSheet()->calculateWorksheetDimension()
);
if you want to let PHPExcel calculate the range for you
Answered By - Mark Baker Answer Checked By - Robin (PHPFixing Admin)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.