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 different colums of data into excel file through code in vc++

Writing different colums of data into excel file through code in vc++

Scheduled Pinned Locked Moved C / C++ / MFC
c++databasecomhelp
2 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. 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.. Can anyone please help me to do this. Thanks Madhavi.

    K 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. 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.. Can anyone please help me to do this. Thanks Madhavi.

      K Offline
      K Offline
      kakan
      wrote on last edited by
      #2

      Just a thought, why don't you use 5 columns for all lines? I.e: Line 1: "Events Table", " ", " ", " ", " " Line 2: "Description of table", " ", " ", " ", " " Line 3: "Date&Time","Source","Cause","Description","Fault" "If you can't beat them, join them"... :)

      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