四川省城乡住房建设厅网站,自己的网站怎么推广,邢台网站设计哪家好,东莞全域取消住房限购政策我试图用python导入excel文件中的mssql数据库数据。我的数据在excel表格中的顺序不正确。e、 g它显示第1列数据#xff0c;然后是第3列#xff0c;第2列#xff0c;然后是第4列#xff0c;依此类推。我使用以下脚本#xff1a;import pyodbcimport csvconnection pyodbc.…我试图用python导入excel文件中的mssql数据库数据。我的数据在excel表格中的顺序不正确。e、 g它显示第1列数据然后是第3列第2列然后是第4列依此类推。我使用以下脚本import pyodbcimport csvconnection pyodbc.connect(Driver{SQL Server Native Client 11.0};ServerMS-DC-06,49208;Database****;uid**;pwd***)cursor connection.cursor()cursor.execute(select top 10 * from Api_NotificationEntry)datacursor.fetchall()for col in data:with open(dataTester.csv, a, newline) as fp:a csv.writer(fp, delimiter,)a.writerow({col[0],col[1]})cursor.close()connection.close()它应该显示这样的数据^{pr2}$但在excel表格中显示如下Col1 Col26550910268965509102689655092689 102689 655096218 655092689 102689 655096218 655092689 102689 112689 122689 132689 142689 1516 26898 267317 26893083 19