VC++ excel date handle
1,use a VARIANT type to read dates of the worksheet sheet1
Range objRange;
VARIANT vaRead;
objRange = sheet1.GetUsedRange(); //get all dates in the table
vaRead = objRange.GetValue();
others :
uchar cell1[NUM] = " ";
uchar cell2[NUM] = " ";
sprintf(cell1, "C1");
sprintf(cell2, "F%u",ucValue);
objRange = sheet1.GetRange( COleVariant( (CString) cell1), COleVariant( (CString) cell2) )//from C1 to F.
//the above one can in try structure,failing handle
2,build a stray,to access the dates
COleVariant av(vaRead);
long index[2];
VARIANT vaBuffer;
index[0] = 1;
index[1] = 1;
av.GetElement(index,vaBuffer); //read the cell at row 1, column 1
for the variant date read above,
fist check the type, use switch or if structure,
than deal with the value