Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7976785
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T09:00:12+00:00 2026-06-04T09:00:12+00:00

Is there a way to import excel data into datatables? My requirement here is,

  • 0

Is there a way to import excel data into datatables? My requirement here is, I want to export datatables data into xls/csv, make bulk changes and import it back to datatables (mysql backend). Is there any plugin for this import?? Please advise. Thanks in advance.

I want to do this import and export on my php webpage, not from mysql directly. Basically, I want to give users an option to bulk download and upload of data

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T09:00:14+00:00Added an answer on June 4, 2026 at 9:00 am

    You can export to CSV:

    SELECT *
    INTO OUTFILE 'filename.csv'
    FIELDS TERMINATED BY ','
    OPTIONALLY ENCLOSED BY '"'
    ESCAPED BY '\\'
    LINES TERMINATED BY '\n'
    FROM tablename
    

    You can import from CSV:

    LOAD DATA LOCAL 
    INFILE 'filaneme.csv' INTO TABLE tablename
    FIELDS TERMINATED BY ','
    ENCLOSED BY '"'
    LINES TERMINATED BY '\n'
    (col1, col2, col3,...)
    

    UPDATED
    Here’s the general idea – write a header, loop through rows, return it with a text/csv MIME-TYPE

    $rsResults = mysql_query($sql, $db) or die(mysql_error());
    $out = '';
    
    $fields = mysql_list_fields('database','table',$db);
    $columns = mysql_num_fields($fields);
    
    for ($i = 0; $i < $columns; $i++) {
        $l=mysql_field_name($fields, $i);
        $out .= '"'.$l.'",';
    }
    
    $out .="\n";
    
    while ($l = mysql_fetch_array($rsResults)) {
        for ($i = 0; $i < $columns; $i++) {
            $out .='"'.$l["$i"].'",';
        }
        $out .="\n";
    }
    
    header("Content-Disposition: attachment; filename=table.csv");
    header("Content-type: text/csv");
    
    echo $out;
    
    exit;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way to import data from a JSON file into R? More
I am trying to import data from excel into a datatable using c#. Here
hello is there a way to import data from excel 2007 file? it is
Is there a way to take HTML and import it to excel so that
Is there a way to import HTML snippets or HAML snippets into a HAML
I want to import data from an Excel file - assume Excel 2003 /
I have the unfortunate task of having to import data from excel into a
I need to import data from Excel into a SQL 2000 db. I need
I'm trying to import data from excel into matlab where the data contains a
Is there an easy way to import a large .sql file of my database

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.