refer to the following. it display number in string format.
///
//change cell font of Excel
///
void CC2Dlg::OnOK()
{//HOWTO: Create Automation Project Using MFC and a Type Library Q178749
//change font of a Cell in excel
try
{
_Application app; // app is an _Application object.
_Workbook book; // More object declarations.
_Worksheet sheet;
Workbooks books;
Worksheets sheets;
Range range; // Used for Microsoft Excel 97 components.
LPDISPATCH lpDisp; // Often reused variable.
COleVariant
covTrue((short)TRUE),
covFalse((short)FALSE),
covOptional((long)DISP_E_PARAMNOTFOUND, VT_ERROR);
if(!app.CreateDispatch("Excel.Applicatio
在vc++中调用Excel,怎样设置单元格的格式可以得到科学计数法显示,且保留两位小数
最新推荐文章于 2021-02-20 13:40:04 发布
