Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. making of .csv file at run time

making of .csv file at run time

Scheduled Pinned Locked Moved C#
databasehelptutorialquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MS Lee
    wrote on last edited by
    #1

    hello friends, i already posted my query but still need some more assistance to clear my doubt, am having a text box to get email address and a combo box to select its category for e.g category might be as IT Dept, Mech Dept and so, at the first form am inserting these to in to a table. in another form i have only the combo box which has loaded with the category data. when i select any category i need all the emails belongs to this category should come with a .csv file.. am stuck in " how to seperate emailid's as per the category and how to bundle it and make a .csv file at run time ... ?Confused

    self confidence+hard work=SUCCESS

    T B 2 Replies Last reply
    0
    • M MS Lee

      hello friends, i already posted my query but still need some more assistance to clear my doubt, am having a text box to get email address and a combo box to select its category for e.g category might be as IT Dept, Mech Dept and so, at the first form am inserting these to in to a table. in another form i have only the combo box which has loaded with the category data. when i select any category i need all the emails belongs to this category should come with a .csv file.. am stuck in " how to seperate emailid's as per the category and how to bundle it and make a .csv file at run time ... ?Confused

      self confidence+hard work=SUCCESS

      T Offline
      T Offline
      Thats Aragon
      wrote on last edited by
      #2

      Hi Lee, I think you have to pass category Id in the DB and get all the emailid regarding that category.Like you have selected category "IT Dept" and its id is 2(CategoryId) then pass it to DB and collect result in DataTable

      select email from tablename where categoryid = 2

      Now you have all the email id in the DataTable. I hope you can now export this data to the .csv file :) Hope this will help you.

      Regards :)

      1 Reply Last reply
      0
      • M MS Lee

        hello friends, i already posted my query but still need some more assistance to clear my doubt, am having a text box to get email address and a combo box to select its category for e.g category might be as IT Dept, Mech Dept and so, at the first form am inserting these to in to a table. in another form i have only the combo box which has loaded with the category data. when i select any category i need all the emails belongs to this category should come with a .csv file.. am stuck in " how to seperate emailid's as per the category and how to bundle it and make a .csv file at run time ... ?Confused

        self confidence+hard work=SUCCESS

        B Offline
        B Offline
        beatles1692
        wrote on last edited by
        #3

        Hi As you know a csv[^] file is a text box with coma separated values in it, so all you have to do is to get your data from database, join values of each row separated with a coma into a string and insert the string to a text file and save it.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups