diff --git a/src/Excel/Document.php b/src/Excel/Document.php index e46ff31..365dba3 100644 --- a/src/Excel/Document.php +++ b/src/Excel/Document.php @@ -76,7 +76,9 @@ class Excel_Document { function save($filename) { $doc = new XMLWriter(); - $doc->openURI($filename); + if (!$doc->openURI($filename)) { + throw new Exception("unknown file " . $filename); + } $doc->setIndent(false); $doc->startDocument('1.0','utf-8'); $doc->startElement('Workbook');