I have one Excel sheet which is getting updated every seconds by some other application or feed but that application is just updating the values in it, it's not storing or saving it. I'm using this code:
date_default_timezone_set('asia/kolkata');
require_once 'excel_reader/Excel/reader.php';
echo $scrptstrt = 'Start = ' . date('Y-m-d H:i:s:u') . '====' . microtime();
if (mysqli_connect_errno()) {
echo 'Failed to connect to MySQL: ' . mysqli_connect_error();
} else {
$con = mysqli_connect('localhost', 'root', '', 'stock');
}
$file_name = 'Arbitrage.xls';
$data = new Spreadsheet_Excel_Reader();
$data->setOutputEncoding('CP1251');
$data->read('C:/ODIN/DIET/' . $file_name);
But this code is reading the values properly if and only if Excel sheet is saved.