Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在创建一个 xl_func,它从 sql server(字符串)接收数据并返回到 excel(auto_resize=True)。代码的结尾是:
result = cursor.fetchall() final_result = [row[0] for row in result] return final_result
它运行正常,但它返回不同列中的每个字符。
我找到了解决方案:
result = cursor.fetchall() final_result = [row[0:1] for row in result] return final_result