This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// set up excel | |
$excel = new COM("excel.application") or die("Unable to instantiate excel"); | |
// run Excel silently, since we don’t want dialog boxes popping up in the background | |
$excel->DisplayAlerts = false; | |
// open up Excel file and select the first sheet, which contains the inputs | |
$excel->Workbooks->Add(); | |
$book = $excel->ActiveWorkbook; | |
$sheets = $book->Sheets; | |
$sheet = $book->Worksheets(1); |