From main.php
$id = $_GET['id'];
<a href="second.php?id=".$id."&name=apple">Excel</a>
How to get the parameters from the url, id and name to Excel and set the cell value dynamically?
Given that there is 2 ids.
Assume that second.php has all the PhpExcel codes.