User Profile

Collapse

Profile Sidebar

Collapse
doubtful1
doubtful1
Last Activity: Jun 9 '15, 01:12 PM
Joined: Jun 2 '15
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • doubtful1
    started a topic add header for .csv

    add header for .csv

    I want to add header for my .csv file.Code snippet is here.The problem is.my code only prints first heading on all columns.
    Can you please help whats wrong.It only prints DeviceIdent in all columns.I want to see all columns in proper heading.
    Code:
    string fileLocation = @"C:\Data\Test.csv";
    
              
                 if (!File.Exists(fileLocation))
                      {
                           File.Create(fileLocation).Close();
    ...
    See more | Go to post
    Last edited by Rabbit; Jun 3 '15, 03:46 PM. Reason: Please use [code] and [/code] tags when posting code or formatted data.

  • c# program to export data to .csv on specfic column only

    Hi,
    i have program that retrieves data from database and writes to a .csv using c#.The test.csv has 7 columns.How to export data to specific ordinal columns only .I need to update only colums2,3,5and 6.


    here's snippet code:


    Code:
                using (SqlConnection con1 = new SqlConnection(ConnectionString))
                {
                    con1.Open();
                    SqlDataAdapter da =
    ...
    See more | Go to post
    Last edited by Rabbit; Jun 2 '15, 04:16 PM. Reason: Please use [code] and [/code] tags when posting code or formatted data.
No activity results to display
Show More
Working...