Import xlrd
INPUT_IP = raw_input ("Please enter an IP:")
input_count_values = Int (raw_input ("Please enter-1 or +1:"))
data = Xlrd.open_workbook (' D:\\1.xls ')
Table_sheet1 = data.sheet_by_name (U ' Sheet1 ')
Sheet1_nrows = Table_sheet1.nrows
Sheet1_ncols = Table_sheet1.ncols
#print type (table_sheet1.row_values (0))
#print type (Table_sheet1.cell (0,0). Value)
x = 0
For y in range (sheet1_nrows):
If input_ip in Table_sheet1.cell (y,0). Value:
Print "FIND"
Ip_y = y
Print Table_sheet1.row_values (ip_y)
If Table_sheet1.row_values (ip_y) [-1] > 0 or Input_count_values = = + 1:
Table_sheet1_updata_row_values = Table_sheet1.row_values (ip_y) [:]
TABLE_SHEET1_UPDATA_ROW_VALUES[-1] = table_sheet1_updata_row_values[-1] + input_count_values
Print Table_sheet1_updata_row_values[-1]
Else
Print "Last_values=0 cannot-1"
Break
Python processing spreadsheet (pre-compilation)