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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T07:22:37+00:00 2026-06-14T07:22:37+00:00

I am a beginner in C#, I am exporting some data to XL sheet

  • 0

I am a beginner in C#, I am exporting some data to XL sheet in CSV format. My data contains a fullname column in which data is like (John, Delores “Sutton”). When I export this to XL it is dividing the data into two columns(or tabs) like Tab1: John and Tab2: Delores “Sutton” because of Comma(,). I want

If I use the below code

string F1 = base.GetColumnText(column, columnValue); //ex: John, Delores \"Sutton\""
string F2 = string.Format("\"{0}\"", F1); //ex: "\"John, Delores\"Sutton\"\""
streamWriter.Write(F2); //ex output in XL is: John, Delores Sutton""

The output in XL is:

John, Delores Sutton””

But I want it as :

John, Delores “Sutton”

  • 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-14T07:22:38+00:00Added an answer on June 14, 2026 at 7:22 am

    You need to have double-double quotes to represent double quotes in a CSV, and everything must be surrounded by double quotes so your output in text will look like:

    "John, Delores ""Sutton"""
    

    So you will need to do a find and replace on the text to double your double quotes…

    F1 = F1.Replace("\"", "\"\"");
    

    Then do your format to surround text with quotes.

    var F2 = string.Format("\"{0}\""), F1);
    

    Savvy?

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

Sidebar

Related Questions

Beginner help needed :) I am doign an example form a php book which
I am a beginner with Python and trying few programs. I have something like
As a beginner learning pointers, I wrote something like int i = 1, j
Beginner question here: I'm trying to understand the some basic memory management. if I'm
Beginner to assembly programming for x86. I have a simple asm file which I
Total beginner with PHP: I have an form based on table data that the
(R beginner here...) I have a dataset like: > head(q) Date Time System User
Beginner question: I want to debug some code that compiles. I pressed debug, it
Beginner programmer here. after a bunch of reading about 'variables' which dont exist in
I have a big problem with exporting my table to Excel file format. Firstly

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.