0 votes
in Python by Beginner (6 points)
Can I use Python to gather data from a website, enter it into a spreadsheet, then email the resultant report daily to a PC?
by Beginner (86 points)
+1
Dear magician59,
    your question is a bit too broad, but here is my suggestion:

1. The Python standard library provides a `urllib` module, which can, among other things, download pages from an HTTP source. That might solve  your first problem of downloading data from a website.

2. The Python standard library provides a `csv` module to handle CSV data, which can be manually loaded into a spreadsheet. How to extract data from the HTML page and convert it into CSV depends on the kind of data you are dealing with. The Python standard library has a `html` package that can parse HTML pages.

3. The Python standard library provides a `smtplib` package that deals with sending e-mails. That would solve your third problem.

If you give some other details on the kind of data you are dealing with, I might give you a better answer.
by Beginner (0 points)
+2

Dear magician,

Of course you can do it all using python.

1. You can use BeautifulSoup to gather data from the website, or alternatively you can use Scrapy framework to achieve the same. Both of these are incredible in their nature and very easy to use.

2. For storing results in Excel files you can use great python library OpenPyXl, this will make your life a lot easier.

3. To send emails you can use smtplib, python's standard email module.

4. To schedule your emails you can use and incredible and very simple schedule library Schedule, and that's it, you're good to go.

1 Answer

0 votes
by Super Expert (2.9k points)
 
Best answer

Question marked as Answered based on majidbilal's comment:

Dear magician,

Of course you can do it all using python.

1. You can use BeautifulSoup to gather data from the website, or alternatively you can use Scrapy framework to achieve the same. Both of these are incredible in their nature and very easy to use.

2. For storing results in Excel files you can use great python library OpenPyXl, this will make your life a lot easier.

3. To send emails you can use smtplib, python's standard email module.

4. To schedule your emails you can use and incredible and very simple schedule library Schedule, and that's it, you're good to go.

Welcome to wellsr Q&A
wellsr Q&A is the VBA and Python programming community that rewards you for learning how to code.

Getting Started
Register
VBA Cheat Sheets (On Sale Now)

Earn free prizes for asking VBA and Python questions and for answering questions asked by others in our community.

Looking for something else? Hire our professional VBA Help, instead.

What makes us different?
Our points system rewards you with a chance for free gifts based on the quality of your questions and answers. All you have to do is post and you could get rewarded, like these members:

ParserMonster $25 Amazon Gift Card
Hightree $10 Amazon Gift Card
Thales1 $10 Amazon Gift Card
runfunke $10 Amazon Gift Card
coolag $10 Amazon Gift Card
Siew Hun $10 Amazon Gift Card

So, why don't you join us? It really is an encouraging way to motivate members in our VBA and Python community.

Register

For more programming tips visit the VBA Tutorials Blog and the Python Tutorials Blog.

...