This morning, the client told me that Excel export ID card when the show some of the wrong, I see the original ID card with the end of X can, the others are not correct. Identity is displayed as shown in the figure:
Search on the internet found that the original Excel to see you number of more than 12 digits will show the scientific count. And the ID card is usually 18 digits, so it shows.
The solution is to put "single quotes" in front of the ID card column. Shape as: ' 4206211111111111111
The specific code is as follows: <TD style= "border:1px solid #000;" > ' <s:property value= ' Id_card '/></td>
This will solve the problem, but the ID number will be exported in front of a single quotation mark.
================================================================
I always feel that there is a better way, I searched the Internet, the export can be set TD style, but I set the still no effect.
Wonderful things constantly ah, I am in the local test can pass, put on the server will have no effect. Finally, we found a way to have an effect both locally and on the server:
Add the following code to the front of the page:
Copy Code code as follows:
<style>
td{
Mso-number-format: ' \@ ';
}
</style>