,VC中怎么将SQL Server的表导出为Excel表格

求助,VC中如何将SQL Server的表导出为Excel表格
如题。数据库中有一张表Result,
VC中如何实现将表导出为Excel表格?

谢谢各位大侠啦。哈哈

------解决方案--------------------
//先从SQL数据库读取,然后写Excel
void WriteFromExcel(int num,CString str1,CString str2,CString str3) 
{
CString path=GetAddr();
if(path.IsEmpty())
::MessageBox(NULL,"获取路径错误",NULL,MB_OK);
else
{
// 新建Excel文件名及路径,TestSheet为内部表名
CSpreadSheet SS(path,"StudentsOut");
CStringArray sampleArray, testRow;
SS.BeginTransaction();

// 加入标题
sampleArray.RemoveAll();
sampleArray.Add("ID");
sampleArray.Add("myname");
sampleArray.Add("age");

SS.AddHeaders(sampleArray);
testRow.Add(str1);
testRow.Add(str2);
testRow.Add(str3);
SS.AddRow(testRow,num,true);
SS.Commit();
}
}

写excel用CSpreadSheet.h这个类,网上挺多资料
------解决方案--------------------
http://blog.****.net/zhoubl668/article/details/4245539