把数据写到excel表里

list= Scrape_news.url_link('http://www.qdaily.com',"span", {"class":"line"})

Scrape_news.url_link('http://www.qdaily.com',"a")

wb = Workbook ()

ws1 = wb.active

for rowin list:

ws1.append ( row)

wb.save ('aaaaa.xlsx' )

报错:Value must be a list, tuple, range or generator, or a dict. Supplied value is

解决: ws1.append ( row)  写成 ws1.append ( [row])

你可能感兴趣的:(把数据写到excel表里)