-2

Python を使用して、SQL クエリの結果を Excel シートにエクスポートしたいと考えています。

コード

sql='''
      Select * from PTWorkOrderTasks 
     '''

// this is the code to generate sql result
sql_result= self.account.DBService().ExecuteQuery(sql,{})

if sql_result.Rows.Count>0:
  (--code to export to excel--)

このクエリ結果を Excel にエクスポートするには、Python コードが必要です。

誰でもこれを修正するのを手伝ってもらえますか?

4

1 に答える 1

0

xlrd を使用できます。Githubのチュートリアルを参照してください。

于 2013-09-24T10:22:45.423 に答える