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. Writing data to excel file through code in vc++

Writing data to excel file through code in vc++

Scheduled Pinned Locked Moved C / C++ / MFC
c++help
3 Posts 2 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.
  • L Offline
    L Offline
    ledallam
    wrote on last edited by
    #1

    Hi, I am working with vc++. I need to write an excel file with the below format in VC++. Events Table - 1st row Description of table - 2nd row Date&Time,Source,Cause,Description,Fault - 3rd row Mar 13 2006 12:25:05.000078,HMI,H-0001,Startup,N Mar 13 2006 12:25:05.000187,HMI,H-0005,Caution,Y Basically the first row in the excel file must have the table heading, second row must have the table description and the third row will have the column names and fourth row onwards the actual data. I am able to create an excel file if all the rows have the same number of columns. But I am unable to create an excel file with different numberof columns in the rows as shown above. Can anyone please help me to do this. Thanks Madhavi.

    H 1 Reply Last reply
    0
    • L ledallam

      Hi, I am working with vc++. I need to write an excel file with the below format in VC++. Events Table - 1st row Description of table - 2nd row Date&Time,Source,Cause,Description,Fault - 3rd row Mar 13 2006 12:25:05.000078,HMI,H-0001,Startup,N Mar 13 2006 12:25:05.000187,HMI,H-0005,Caution,Y Basically the first row in the excel file must have the table heading, second row must have the table description and the third row will have the column names and fourth row onwards the actual data. I am able to create an excel file if all the rows have the same number of columns. But I am unable to create an excel file with different numberof columns in the rows as shown above. Can anyone please help me to do this. Thanks Madhavi.

      H Offline
      H Offline
      HakunaMatada
      wrote on last edited by
      #2

      When u say Excel file, do you mean a .xls file? How did you go about creating the excel file. Please post more details! Have you tried using the Excel Object Model? --- With best regards, A Manchester United Fan The Genius of a true fool is that he can mess up a foolproof plan!

      L 1 Reply Last reply
      0
      • H HakunaMatada

        When u say Excel file, do you mean a .xls file? How did you go about creating the excel file. Please post more details! Have you tried using the Excel Object Model? --- With best regards, A Manchester United Fan The Genius of a true fool is that he can mess up a foolproof plan!

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

        I am using the CSpreadSheet class from codeproject website: http://www.codeproject.com/database/cspreadsheet.asp but this class is not allowing to write data in the above format..

        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