我正在创建一个xl_func,它从sql server(字符串)接收数据并返回excel(auto_resize = True)。代码的结尾是:
result = cursor.fetchall()
final_result = [row[0] for row in result]
return final_result
答案 0 :(得分:0)
我找到了解决方案:
result = cursor.fetchall()
final_result = [row[0:1] for row in result]
return final_result