Fix stripping of leading zero for text columns (footprint)
[eda-utils.git] / bomgen / Bomgen / functions.inc.php
index 1340e11..924374e 100644 (file)
@@ -184,7 +184,11 @@ function xls_write_cell_gen($row, $col, $value, $format_texte, $entete, $size, $
     $format->setLeft(1);   /* Bordure de gauche. */
   }
 
-  $worksheet->write($row, $col, $value, $format);
+  if ($format_texte == XLS_FORMAT_TEXT) {
+    $worksheet->writeString($row, $col, $value, $format);
+  } else {
+    $worksheet->write($row, $col, $value, $format);
+  }
 }
 
 function xls_write_col_header($row, $col, $value)