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 8649493
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T13:34:32+00:00 2026-06-12T13:34:32+00:00

I want to do something really simple. I just want to export excel data

  • 0

I want to do something really simple.
I just want to export excel data to a CSV in order to put it in a Mysql DB.

It is a huge excel so I can’t manage exceptions easily.

My problem is that when I save my xslx into csv, it put me the " to separate columns only if there is a comma in the column or if there is already a " so I have something like that in my CSV :

col1 | col2 | col3 => col1,col2,col3
col1 | co,l2| col3 => col1,"co,l2",col3 
col1 |"col"2| col3 => col1,"""col""2",col3 
col1 |      | col3 => col1,,col3

So I tried a lot of tings to convert it for SQL but i don’t find a good way.

I work in Excel 2007 and SQL want to CSV to have this config:

Columns separated with: ,
Columns enclosed with: "
Columns escaped with: \
Lines terminated with: auto
  • 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-12T13:34:33+00:00Added an answer on June 12, 2026 at 1:34 pm

    So you want to load your data using

    LOAD DATA FROM INFILE 'filename.csv'
    INTO TABLE tablename
    COLUMNS TERMINATED BY ','
            OPTIONALLY ENCLOSED BY '"'
    LINES TERMINATED BY '\r\n'
    

    The OPTIONALLY is actually ignored when loading a file, or to phrase it a better way, even if you don’t specify OPTIONALLY, the enclosing will still be treated as optional. Which means that a column value may be enclosed in quotation marks, but need not be. Note that afaik. Excel does not use \ to escape values.

    If you need some other format for purposes other than importing into MySQL, then you may re-export the data from MySQL afterwards, with the settings you prefer. When writing a file, omitting the OPTIONALLY will turn quotes on for every value.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to do something really simple, I just can't seem to find the
I really just want to do something like x <- as.integer(c(1,2,3)) But because c(1,2,3)
Hey guys I'm trying to do something really simple.. I'm checking a data column
I'm pretty sure this is really simple, and I'm just missing something obvious. I
This is something really simple, but I can't seem to find the answer anywhere,
I'm new to mercurial and I'm trying to do something really simple but can't
this should be really simple but I can just not figure it out at
I want to do something that feels like it should be really simple, but
Ok, maybe I'm doing something really stupid. I'm on OSX 10.6.1. I want to
Someone posted something similar but it didn't really solve the problem. I want to

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.