Datatables export Excel

0 votes

I'm exporting the datatables in csv. And when I open the file with excel, I've got problem with big numbers (around 20 digits). I also have problem with the special characters. I guess it's a formatting problem. But I don't know How to correct the problem.

The code in my Js file:

dom: 'Bfrtip',
    buttons: [
        {
            extend: 'csv',
            text: 'csv',
            fieldSeparator: ';' // with ';' we can export the file in csv and each column is in one column. Without ';' everything is in one column
        },
        'pdf',
        'print'
    ]

An image of the problem: enter image description here

Thanks for your help.

Jun 8 in JQuery by Edureka
• 13,640 points
7 views

1 answer to this question.

0 votes

Follow the following steps :

  1. Add Interop References. First we need to add a reference for Microsoft.office.interop.Excel as in the following:
  2. Create a DataTable dynamically.
  3. Class file for generating Excel. ...
  4. Creation of Excel objects. ...
  5. Initialization of Excel objects. ...
  6. Writing to Excel file. ...
  7. Working with range and formatting Excel cells. ...
  8. Coloring cells.
answered Jun 9 by gaurav
• 12,980 points

Related Questions In JQuery

0 votes
0 answers

Datatables: Cannot read property 'mData' of undefined

I am having trouble with data tables, ...READ MORE

May 12 in JQuery by Kichu
• 19,040 points
79 views
0 votes
1 answer

How to turn off Auto Refresh on "Stock Price" Data Type in Excel

How do you stop Excel from automatically ...READ MORE

answered Jun 9 in JQuery by gaurav
• 12,980 points
5 views
0 votes
1 answer

How to upload excel file to php server from <input type="file">

You first need to upload the file ...READ MORE

answered Jun 9 in JQuery by gaurav
• 12,980 points
17 views
0 votes
1 answer

Calculate the number of days between a cell and today in excel?

Excel Formula to Calculate Number of Days ...READ MORE

answered Jun 9 in JQuery by gaurav
• 12,980 points
6 views
0 votes
1 answer
0 votes
1 answer

datatable remove column on export to pdf and excel

When we are using jquery datatable for ...READ MORE

answered Feb 17 in Others by gaurav
• 12,980 points
674 views
0 votes
0 answers

Datatables export Excel

I'm exporting the datatables in csv. And ...READ MORE

Apr 7 in Database by Edureka
• 13,640 points
73 views
0 votes
0 answers

TypeError: $(...).DataTable is not a function

I am working on jQuery's Datatable JS ...READ MORE

Apr 29 in Git & GitHub by Kichu
• 19,040 points
282 views
0 votes
1 answer

Export DataTable to Excel File

Add Interop References. First we need to ...READ MORE

answered Jun 9 in JQuery by gaurav
• 12,980 points
5 views
0 votes
1 answer

Disable Sorting in excel

Go to the Home ribbon, click the ...READ MORE

answered Jun 9 in JQuery by gaurav
• 12,980 points
7 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP