I am writing a script that reads data from excel files and writes into a postgresql database. I have read data from the excel file and stored each row data as an array of strings.
I tried a couple of things, like
for x in range(len(sh.columns)):
i = users.insert()
i.execute({sh.columns[x] : sh.values[0][x]})
Here sh is the reference to my excel sheet and the table I'm editing in the postgreSQL database i referred to by users.
I also tried an
'INSERT INTO users VALUES %s'%(tuple(sh.values[0])
and a few more variations of that.
This is really urgent and I've spent over three days on this one task, unable to figure out how to go about it.