I've been trying to insert data from excel into a table I've created using sqlite3 in python. However with the current code it will only return 'none' for each value instead of the actual values from the excel spreadsheet.
row_count = sheet.max_row - 1
count1 = 2
while count1 < row_count:
cursor.execute("INSERT INTO violations (points, serial_number, violation_code, violation_description, violation_status) VALUES (?, ?, ?, ?, ?)", (sheet.cell(row=(count1), column='A').value, sheet.cell(row=(count1), column='B').value, sheet.cell(row=(count1), column='C').value, sheet.cell(row=(count1), column='D').value, sheet.cell(row=(count1), column='E').value))
count1 = count1 + 1
So far i think the issue comes from the way the values are connected into the sql code with all the question marks as place holders for the other values, but I'm not sure how else to do this successfully. All help is greatly appreciated thank you :)