This topic is locked

Export and import of values starting with zero

2/19/2026 11:21:25
PHPRunner Tips and Tricks
Sergey Kornilov admin

When you export values like 0087633 to Excel, it may treat these as numbers and drop leading zeroes. If you export value and import it back 0087633 will become 87633. Here is a simple workaround. While it is not perfect, it works well. The trick is to add a space to the exported value and remove it on import. Excel will treat this value as a string and will preseree leading zeroes.

.

  1. Table --> export page --> before export record

$values["FieldName"]=$values["FieldName"]." ";
return true;
  1. Table --> import page --> before insert record

$values["FieldName"]=trim($values["FieldName"]);
return true;