合并单元格
CA_VariantSetCString (&MyCellRangeV, "A1:F2");
Excel_WorksheetRange (worksheetHandle, NULL, MyCellRangeV, CA_DEFAULT_VAL, &ExcelRangeHandle);
Excel_RangeMerge (ExcelRangeHandle, NULL, CA_DEFAULT_VAL);
设置宽度
ExcelRpt_SetCellRangeAttribute (worksheetHandle, "A1", ER_CR_ATTR_COLUMN_WIDTH, 15.0);
设置字体大小
ExcelRpt_SetCellRangeAttribute(worksheetHandle, "A1",ER_CR_ATTR_FONT_SIZE,20);
设置字体加黑
ExcelRpt_SetCellRangeAttribute(worksheetHandle, "A1",ER_CR_ATTR_FONT_BOLD,ExRConst_True);
设置对齐方式
ExcelRpt_SetCellRangeAttribute (worksheetHandle, "A1", ER_CR_ATTR_HORIZ_ALIGN, ExRConst_HAlignCenter);
写数据
ExcelRpt_SetCellValue (worksheetHandle, "A1", ExRConst_dataString,"测试报告");
设置边框
ExcelRpt_RangeBorder (worksheetHandle, "A1:F2", ExRConst_Continuous, VAL_BLACK, ExRConst_Thin, 0xf0);