2

I am using bootstrap-table to show tables in my page and I use TableExport.js , FileSaver.js and .xlsx.core.min.js libraries in order to save the table in .xlslx format.

The problem is that the below column in excel is shown in general format, causing the values to be displayed like 1,00582E+11, while the right value is 100582012421.

I tried data-tableexport-msonumberformat="\@" to force export process to treat this column as a text, but the result didn't change. I also read this similar question and I create a CSS class

.text{ mso-number-format:"\@";/*force text*/ }

but neither this solution worked for me..

<table id="mytable" class="table table-hover" 
       ...
       data-url="myfile.json" 
       ...                
       >
    <thead>
        <tr>
            ...
            <th data-field="productId" data-tableexport-msonumberformat="\@">Product</th>
            ...
        </tr>
    </thead>
</table>
yaylitzis
  • 5,354
  • 17
  • 62
  • 107

1 Answers1

1

Use into td the class tableexport-string

<td class="tableexport-string">{{$Rep->deviceName}}</td>