我想在Excel工作表范围内找到topleft cell和bottomright单元格,这是工作表中所有已占用单元格的边界框,来自赢得7的ironpy 2.7.5。
我的代码:
from Microsoft.Office.Interop import Excel
from System import Type
excel = Excel.ApplicationClass()
workbook = excel.Workbooks.Open(excelFilename, False, True)
allWorksheets = workbook.WorkSheets
for aWorkSheet in allWorksheets:
last = aWs.Cells.SpecialCells(Excel.XlCellType.xlCellTypeLastCell, Type.Missing);
range = excel.get_Range("A1", last);
print "a worksheet range is " + str(range)
我需要找到"范围内的topleft cell和bottomright cell"
的链接Programmatically getting the last filled excel row using C#
How to get the range of occupied cells in excel sheet
无法帮助我。
有什么建议吗?谢谢
答案 0 :(得分:0)