用dephi7读取excel文件,网上很多代码里都有这个函数,运行时提示未声明。
想问一下ColRowNumToStr这个函数需要什么声明?

解决方案 »

  1.   

    这是网上下载的,原作者,未将它贴出,是保留了。本人理解就是将0..255   0..n 转换为EXCEL的行列字符(如:A1)function ColRowNumToStr(J, I:integer):string;
    begin
      .....
    end;
      

  2.   

                         ExcelApp.ActiveSheet.Columns[i+1].ColumnWidth := 10;     //设置列宽
                         if i=0 then
                            ExcelApp.ActiveSheet.Columns[i+1].NumberFormat:='@'
                         else
                            ExcelApp.ActiveSheet.Columns[i+1].NumberFormat:='0.00';
                         excelapp.cells[3,i+1].HorizontalAlignment:= $FFFFEFF4;   //水平居中