diff --git a/xlsxwriter.class.php b/xlsxwriter.class.php
index 97c313a77..39f9ce584 100644
--- a/xlsxwriter.class.php
+++ b/xlsxwriter.class.php
@@ -19,6 +19,7 @@ class XLSXWriter
protected $company;
protected $description;
protected $keywords = array();
+ protected $tempdir;
protected $current_sheet;
protected $sheets = array();
@@ -369,7 +370,7 @@ protected function writeCell(XLSXWriter_BuffererWriter &$file, $row_number, $col
if (!is_scalar($value) || $value==='') { //objects, array, empty
$file->write('');
} elseif (is_string($value) && $value[0]=='='){
- $file->write(''.self::xmlspecialchars($value).'');
+ $file->write(''.self::xmlspecialchars(ltrim($value, '=')).'');
} elseif ($num_format_type=='n_date') {
$file->write(''.intval(self::convert_date_time($value)).'');
} elseif ($num_format_type=='n_datetime') {