我只能得到有多少个sheet.和当前sheet有多少行、列。
就是不能切换sheet得到别的sheet的行、列
ExcelApplication1.ActiveCell.SpecialCells(xlCellTypeLastCell,EmptyParam).Select;
row:=ExcelApplication1.ActiveCell.Row;
col:=ExcelApplication1.ActiveCell.Column;
就是不能切换sheet得到别的sheet的行、列
ExcelApplication1.ActiveCell.SpecialCells(xlCellTypeLastCell,EmptyParam).Select;
row:=ExcelApplication1.ActiveCell.Row;
col:=ExcelApplication1.ActiveCell.Column;
ExcelApp.WorksSheets[ 'Sheet2' ].Activate;
row2:=ExcelApplication1.ActiveCell.Row;
col2:=ExcelApplication1.ActiveCell.Column;
ExcelApp.ActiveCell.SpecialCells(xlCellTypeLastCell,EmptyParam).Select;
row:=ExcelApp.ActiveCell.Row;
col:=ExcelApp.ActiveCell.Column;