How do I export a list from Python to Excel?
I have a script to export a list of names.
I have tried to open the file up in Excel (I need to do this on a Mac), however, Excel asks me for my AppleID. So I can't open the file I just created in my scripts as an excel spreadsheet. Is there a way to open the list of names as an excel sheet?
Script: import os. Import urllib.request import sys. Import requests. Import json. From bs4 import BeautifulSoup. Print("This script will scrape "). Useragent = 'Mozilla/5.0 (Windows NT 6.3; Win64; x64; ru-RU) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.2490.80 Safari/537.36'
Harrypotterbase = "". Harrypotterurl = harrypotterbase. Def printname(): soup = BeautifulSoup(urllib.urlopen(harrypotterurl).read().decode())
table1 = soup.find('table') rows = table1.
Related Answers
How do I Export data from a form to Excel?
How can I export my data to Excel? Export the data to Ex...
How can I open a PDF file in Excel for free?
How to Convert PDF to Excel for Free. Convert PDF to Exce...
How do I write to an existing Excel file in Python?
Let's take a step back. In this post, we'll write a simple Python script...