我想把某个格子属性设置为文本(日期,数字,常规,自定义)在delphi中怎么写??

解决方案 »

  1.   

    //设定列格式
            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 就可
      

  2.   

    7.设置E列单元格式为3位小数数值
      Excel.Columns['E:E'].NumberFormatLocal:='#,##0.000_ '
    8.设置E列单元格式为文字
      Excel.Columns['E:E'].NumberFormatLocal:='@'http://qa.yesky.com/447/607947.shtml
      

  3.   

    http://community.csdn.net/Expert/topic/4634/4634208.xml?temp=.6999018