Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions SpreadsheetReader_XLSX.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ class SpreadsheetReader_XLSX implements Iterator, Countable

private $Options = array(
'TempDir' => '',
'ReturnDateTimeObjects' => false
'ReturnDateTimeObjects' => false,
'ForceDateFormat' => 'Y-m-d H:i:s'
);

private static $RuntimeInfo = array(
Expand Down Expand Up @@ -831,7 +832,11 @@ private function FormatValue($Value, $Index)

if (!$this -> Options['ReturnDateTimeObjects'])
{
$Value = $Value -> format($Format['Code']);
if ($this->Options['ForceDateFormat']) {
$Value = $Value->format($this->Options['ForceDateFormat']);
} else {
$Value = $Value->format($Format['Code']);
}
}
else
{
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "nuovo/spreadsheet-reader",
"name": "virtua-network/spreadsheet-reader",
"description": "Spreadsheet reader library for Excel, OpenOffice and structured text files",
"keywords": ["spreadsheet", "xls", "xlsx", "ods", "csv", "excel", "openoffice"],
"homepage": "https://github.com/nuovo/spreadsheet-reader",
"version": "0.5.11",
"time": "2015-04-30",
"version": "1.0",
"time": "2016-09-07",
"type": "library",
"license": ["MIT"],
"authors": [
Expand Down