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 / C++ / MFC
  4. how to save my data in notepad or excel

how to save my data in notepad or excel

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialdatabasequestion
5 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.
  • G Offline
    G Offline
    gentleguy
    wrote on last edited by
    #1

    dear all i would like to save my data formated 100x3, i need to save it row by row when my program will run. how to program for this function? thanks a lot. for example: sprintf(buff, "C:\database\%d",mydata), if i want to save a certain file in notepad or excel, how to do it?

    gentleguy

    H D 2 Replies Last reply
    0
    • G gentleguy

      dear all i would like to save my data formated 100x3, i need to save it row by row when my program will run. how to program for this function? thanks a lot. for example: sprintf(buff, "C:\database\%d",mydata), if i want to save a certain file in notepad or excel, how to do it?

      gentleguy

      H Offline
      H Offline
      Hamid Taebi
      wrote on last edited by
      #2

      Can you use like this code? HANDLE handle=CreateFile(_T(""C:\\database\\123.txt"),...) CFile m_File(handle); m_File.Write(mydata); ... ...

      G 1 Reply Last reply
      0
      • H Hamid Taebi

        Can you use like this code? HANDLE handle=CreateFile(_T(""C:\\database\\123.txt"),...) CFile m_File(handle); m_File.Write(mydata); ... ...

        G Offline
        G Offline
        gentleguy
        wrote on last edited by
        #3

        i never use such code, can you explain detail thanks a lot. how to use sprintf() function to do this? thanks

        gentleguy

        H 1 Reply Last reply
        0
        • G gentleguy

          i never use such code, can you explain detail thanks a lot. how to use sprintf() function to do this? thanks

          gentleguy

          H Offline
          H Offline
          Hamid Taebi
          wrote on last edited by
          #4

          See CFile::CFile [^] on the MSDN and see on the codeprojectCStdioFile-derived class for multibyte and Unicode reading and writing[^] of course it uses of CStdioFile.

          1 Reply Last reply
          0
          • G gentleguy

            dear all i would like to save my data formated 100x3, i need to save it row by row when my program will run. how to program for this function? thanks a lot. for example: sprintf(buff, "C:\database\%d",mydata), if i want to save a certain file in notepad or excel, how to do it?

            gentleguy

            D Offline
            D Offline
            David Crow
            wrote on last edited by
            #5

            So what exactly do you need help with? What code do you have so far? What does your data structure look like?

            "Love people and use things, not love things and use people." - Unknown

            "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

            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