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. table like structure(multiple collumns)

table like structure(multiple collumns)

Scheduled Pinned Locked Moved C / C++ / MFC
c++
4 Posts 4 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.
  • S Offline
    S Offline
    Spiritofamerica
    wrote on last edited by
    #1

    hello I need to make a program that is supposed to export data to a table like structure.I am coding in vc++ 6.0 Is there some way to dump all the data resulted from a program to a excel table or something also, I have some experiences with list boxes in c, is there any way to make a list box have 2 collumns instead of just one or does this simply require 2 listboxes placed one next to another. Is there another structrre besides the li9st box that I could use to display the resulting data in a table like form. Any other suggestions about how a program like this might best be designed are also wellcomed. thank you pLesae reply.

    PJ ArendsP L B 3 Replies Last reply
    0
    • S Spiritofamerica

      hello I need to make a program that is supposed to export data to a table like structure.I am coding in vc++ 6.0 Is there some way to dump all the data resulted from a program to a excel table or something also, I have some experiences with list boxes in c, is there any way to make a list box have 2 collumns instead of just one or does this simply require 2 listboxes placed one next to another. Is there another structrre besides the li9st box that I could use to display the resulting data in a table like form. Any other suggestions about how a program like this might best be designed are also wellcomed. thank you pLesae reply.

      PJ ArendsP Offline
      PJ ArendsP Offline
      PJ Arends
      wrote on last edited by
      #2

      Spiritofamerica wrote: Is there some way to dump all the data resulted from a program to a excel table or something The easiest way is to write your data to a *.csv (comma seperated values) file. *.csv files are simple text files that are easy to create and are supported by most database and spread sheet programs out there. Spiritofamerica wrote: is there any way to make a list box have 2 collumns instead of just one List boxes can be created with the LBS_MULTICOLUMN style, but I have never used a listbox that way. I use a ListView control instead when I want multiple columns.


      "You're obviously a superstar." - Christian Graus about me - 12 Feb '03 "Obviously ???  You're definitely a superstar!!!" mYkel - 21 Jun '04 Within you lies the power for good - Use it!

      Within you lies the power for good; Use it!

      1 Reply Last reply
      0
      • S Spiritofamerica

        hello I need to make a program that is supposed to export data to a table like structure.I am coding in vc++ 6.0 Is there some way to dump all the data resulted from a program to a excel table or something also, I have some experiences with list boxes in c, is there any way to make a list box have 2 collumns instead of just one or does this simply require 2 listboxes placed one next to another. Is there another structrre besides the li9st box that I could use to display the resulting data in a table like form. Any other suggestions about how a program like this might best be designed are also wellcomed. thank you pLesae reply.

        L Offline
        L Offline
        lisoft
        wrote on last edited by
        #3

        To use Excel function in VC++, you should first import Excel typelib From your office location and than use the code like:
        CoInitialize(NULL); // Init COM CLSIDFromProgID(L"Excel.Application",&clsid); _Application ExcelApp; //Construct Excel object if (FAILED(GetActiveObject(clsid, NULL, (IUnknown**)&pUnk))) { if (!ExcelApp.CreateDispatch("Excel.Application")) { AfxMessageBox("Failed to create Excel object!"); } } else { hr=pUnk->QueryInterface(IID_IDispatch, (void**)&pDispExcel); ExcelApp.AttachDispatch(pDispExcel); } // and ... See MSDN for detail reference.

        Lisoft

        1 Reply Last reply
        0
        • S Spiritofamerica

          hello I need to make a program that is supposed to export data to a table like structure.I am coding in vc++ 6.0 Is there some way to dump all the data resulted from a program to a excel table or something also, I have some experiences with list boxes in c, is there any way to make a list box have 2 collumns instead of just one or does this simply require 2 listboxes placed one next to another. Is there another structrre besides the li9st box that I could use to display the resulting data in a table like form. Any other suggestions about how a program like this might best be designed are also wellcomed. thank you pLesae reply.

          B Offline
          B Offline
          bmzhao
          wrote on last edited by
          #4

          If you use dialog display data , you can add List Control(not List Box) to the dialog.

          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