Export Table to Excel, Problems with String Numerica

1

I looked here in the Stack, but maybe I did not find the right question, I'm exporting data from PHP to Excel with HTML tags, it exports in a good, I happen to have a column that is String, for example "89551010326000103872", but I have tried to put (String) $ Data to force the use of string, but as I hoped it did not work.

A table row is more or less this

...
<table> 
<tr>
<td>89551010326000103872 </td>
<td>CONTROLE</td>
</tr> 
</table> 
...

Is there anything I can put in TD for excel to understand that it is a String and not a number?

    
asked by anonymous 04.09.2017 / 19:16

1 answer

0

To escape a number in a cell as a string, you can put a single quotation mark at the beginning of the cell, so it would look like this:

...
<table> 
<tr>
<td>'89551010326000103872 </td>
<td>CONTROLE</td>
</tr> 
</table> 
...
    
04.09.2017 / 19:43