0

I'm creating a xl_func that receives data from sql server (string) and return to excel (auto_resize=True). The end of the code is:

result = cursor.fetchall()
final_result = [row[0] for row in result]
return final_result

It runs okay, but it returns each character in a different column. enter image description here

ranthero
  • 92
  • 7

1 Answers1

0

I found the solution:

result = cursor.fetchall()
final_result = [row[0:1] for row in result]
return final_result
ranthero
  • 92
  • 7