from ironxl import * # Load existing spreadsheet workbook = WorkBook.Load("sample.xls") worksheet = workbook.WorkSheets[0] # Get a range from an Excel worksheet selected_range = worksheet["A2:A8"] # Combine two ranges combined_range = selected_range + worksheet["A9:A10"] # Iterate over the combined range for cell in combined_range: print(cell.Value)
合併 Excel 範圍