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