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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T06:13:59+00:00 2026-06-18T06:13:59+00:00

I am trying to generate csv file from the list of strings those can

  • 0

I am trying to generate csv file from the list of strings those can contain comma in them, so I am enclosing the string inside quotes to let excel treat the column as text type.

But the strange thing I am facing is, it only works for first column!!! so if I have the text like this

FirstColumn, SecondColumn
"a, b"     , secondcolumnvalue

it works as expected and returns me this

enter image description here

but if I try to use this text

firstcolumn, secondcolumn
"a, b"     , "c, d"

it returns me this

enter image description here

which is not correct.

I tried many combinations to make it work, like putting more than one quotes pair around the string, putting quotes on comma only etc. but nothing worked for any column other than the first one.

To check if it is not something related to my code I tried creating and checking files manually, but the same result.

Any idea will be appreciable!

Thanks!

  • 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-18T06:14:01+00:00Added an answer on June 18, 2026 at 6:14 am

    Get rid of the spaces between values, so it’s like this:

    firstcolumn,secondcolumn
    "a, b","c, d"
    

    I don’t know why this works, but (after a bit of testing) it seems it will work if there’s a space before the comma "a, b","c, d" but not if there’s a space between the , and the " – "a,b", "c,d" – so I’d guess that Excel’s parser is looking for the token ," when looking for quoted entries.

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

Sidebar

Related Questions

I am trying to generate a CSV file from DB Query as source one
I am trying to generate a .csv from an xml file which includes a
I am trying to generate an .arff file from a csv data file I
I'm trying to dynamically generate a csv file with some cells that will contain
Quite simply, I'm trying to generate and download a CSV file from a CakePHP
I'm trying to generate SQL table header from a csv file. As I had
I'm trying to extract two different elements from a KML file and turn them
I'm trying to get django to serve CSV data from a Model to generate
I am trying to create a dictionary from a csv file. The first column
I'm trying to generate Item IDs using StreamReader on my .CSV file (It has

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.