excel定位

ZSACH

关注

阅读 109

2022-11-27

excelManager.Application.Goto(strTipCost, null);
intTempRowIndex = excelManager.Application.ActiveCell.Row;
itnTempColumIndex = excelManager.Application.ActiveCell.Column;
Excel.Range rangeSourceLabel = excelManager.Worksheet.get_Range(excelManager.Worksheet.Cells[intTempRowIndex + 2, itnTempColumIndex - 1], excelManager.Worksheet.Cells[intTempRowIndex + 5, itnTempColumIndex-1]);
rangeSourceLabel.Copy(rangeTargetLabel);
rangeTargetLabel.ColumnWidth = rangeSourceLabel.ColumnWidth;

精彩评论(0)

0 0 举报