delphi操作EXCEL, 如何隐藏EXCEL中的行或列? 

解决方案 »

  1.   

    不知道对应的函数是什么就用Excel的宏,它会生成操作对应的代码。
      

  2.   

    if not ExcelApp.ActiveSheet.columns[icol].Hidden=true then  //隱藏列
    if not ExcelApp.ActiveSheet.rows[irow].Hidden=true then     //隱藏行
      

  3.   


    所有Excel控制方法都可以如此得到:录制VBA,然后将VBA代码转为Delphi代码