如题
可能类似于, sheet.rang.firstrow, sheet.rang.firstcol ,sheet.rang.lastrow.   可是具体怎么样写呢?过路在侠告知一声哦!

解决方案 »

  1.   

    在delphi中操作Excel应该要用到olecontain吧,有点难度
      

  2.   

    sheet.Activate;//先要你要操作的Sheet 没有找到好的方法
    ShowMessage('开始行 '+ Selection.Row);
    ShowMessage('总行数 '+ Selection.Rows.Count);
    ShowMessage('开始列 '+ Selection.Column);
    ShowMessage('总列数 '+ Selection.Columns.Count);
      

  3.   

    要定义一个变量为ExcelApplication
    var
      App: Variant;
    begin
    App := CreateOleObject('....');
    ......
    sheet.Activate;//先要你要操作的Sheet 没有找到好的方法 
    ShowMessage('开始行 '+ App.Selection.Row); 
    ShowMessage('总行数 '+ App.Selection.Rows.Count); 
    ShowMessage('开始列 '+ App.Selection.Column); 
    ShowMessage('总列数 '+ App.Selection.Columns.Count); 
    end;