//设定列格式 if (Columns[i].Field<>nil) then begin if Columns[i].Field.DataType=ftString then XL.ActiveWorkbook.ActiveSheet.Columns[i+1].NumberFormatLocal:='@' else XL.ActiveWorkbook.ActiveSheet.Columns[i+1].NumberFormatLocal:='G/通用格式'; end; http://www.vbzx.net/ArticleView/vbzx_Article_View_418.asp色设置 NumberFormatLocal 就可
if (Columns[i].Field<>nil) then begin
if Columns[i].Field.DataType=ftString then
XL.ActiveWorkbook.ActiveSheet.Columns[i+1].NumberFormatLocal:='@'
else
XL.ActiveWorkbook.ActiveSheet.Columns[i+1].NumberFormatLocal:='G/通用格式';
end;
http://www.vbzx.net/ArticleView/vbzx_Article_View_418.asp色设置 NumberFormatLocal 就可
Excel.Columns['E:E'].NumberFormatLocal:='#,##0.000_ '
8.设置E列单元格式为文字
Excel.Columns['E:E'].NumberFormatLocal:='@'http://qa.yesky.com/447/607947.shtml