Tag: 请求

Python将excel数组分解成字符

当我把代码放入excel中时,每个字符都被隔开。 这使得星期二在excel中看起来像T,u,e,s,d,a,y。 目标是使excel中的每个单元格都有自己的单词而不是字符。 有很多循环,我很难find这个持续的问题的答案。 有任何想法吗? import requests from pprint import pprint from xml.dom.minidom import parseString from openpyxl import Workbook NMNorth2=[("Farmington"),("Gallup"),("Grants"),("Las_Vegas"),("Raton"),("Santa_Fe"), ("Taos"),("Tijeras"),("Tucumcari")] NMNorth=[("NM", "Farmington"),("NM", "Gallup"),("NM", "Grants"),("NM", "Las_Vegas"),("NM", "Raton"),("NM", "Santa_Fe"), ("NM", "Taos"),("NM", "Tijeras"),("NM", "Tucumcari")] wb = Workbook() dest_filename = 'weather.xlsx' ws1 = wb.active ws1.title = "Weather" for state, city in NMNorth: r = requests.get("http://api.wunderground.com/api/id/forecast/q/"+state+"/"+city+".json") data = r.json() […]

将Access 2010结果表传输到Excel文件中的现有内容之后

我需要想出一个更新的VBA脚本,将当前内容之后的Access 2010请求的结果传输到现有的Excel文件中。 这是前面的脚本,与Access 97一起工作。 Private Sub CmdTransfert_Click() On Error GoTo Err_CmdTransfert_Click Dim Requete As QueryTable Dim appXL As Excel.Application Dim Classeur As Excel.Workbook Dim Cellule As Excel.Range Dim Plage As Excel.Range ' Bills that needs to be transfered DoCmd.OpenQuery "Liste_factures_numero" ' Select answers SendKeys "^a", True ' Copy SendKeys "^c", True ' Opening Excel Set […]