01-05-2021



In this article, I shall show you how to pull or extract data from a website into Excel automatically. This is one of the most used Excel features for those who use Excel for their data analysis job. If you are working for a financial analyst company, you might need to get or import daily stock prices from a website to your Excel workbook for analysis.

Different applications can be used to display a workbook in a browser window. Depending on how your environment is configured, you could be using Excel for the web (part of Office for the web), Excel Web App (part of Office Web Apps on premises), or Excel Services in SharePoint Server (on premises) to view a workbook in a browser window. If you like this video, here's my entire playlist of Excel tutorials: the basics of using Microsoft Excel, including the anatom. Excel Online (Business) connector lets you work with Excel files in document libraries supported by Microsoft Graph (OneDrive for Business, SharePoint Sites, and Office 365 Groups). To use the ‘RAND’ function, all you have to do is enter its syntax on a cell: =RAND That’s it! No arguments or whatsoever. Just straight on type the syntax of the function and press ‘Enter’ on your keyboard. Combined with sorting, you would now be able to piece the puzzle on how to shuffle a list in Excel. To open the document in the browser, click on any Word, Excel, or PowerPoint file – by default, the file will open using Office Online (in the browser). The screenshot below shows an example of a Word document opened in the browser, though the same behavior applies to Excel and PowerPoint as well.

So, let’s learn the technique…

Extracting data (data collection and update) automatically from a web page to your Excel worksheet might be important for some jobs. Excel gives you the opportunity to collect data from a web page.

Yes, Excel is awesome like that!!

Let’s dive into the process of helping you out.

But first, a word of caution: the web page must have data in collectible formats like Table or Pre-data format. Otherwise, it would be another battle to convert it to a readable or excel-able format. You see text to columns feature isn’t always your best friend.

So, we shall assume your life is easy like that and you have a website that has data in a compatible excel-able format.

Table of Contents

Extract Data from Google Finance Page to Excel Automatically

We will be using Excel’s From Web Command in the Data ribbon to collect data from the web. Say, I want to collect data from this page.

It is Google’s finance-related web page.

In the Excel worksheet, open the Data ribbon and click on the From Web command.

New Web Query dialog box appears.

In the address bar, I paste the address of Google’s finance web page: https://www.google.com/finance. Then I click on the Go button, placed right after the address bar.

The same web page comes in the query dialog box. Now spot the yellow arrows near the query box.

Move your mouse pointer over the yellow arrows. You see a zone is highlighted with a blue border and the yellow arrow becomes green.

[Click on the image to get a full view]

I have chosen World Markets data, Currency Data, and Sector Summary.

Now I click on the Import button. Import Data dialog box appears. It asks me about the location. Currently, I am planning to save it in cell A1, you can save it anywhere and everywhere.

You might see a cryptic message or two when you hit OK. Relax those aren’t aliens trying to contact you, just your worksheet is populating data.

You see the data is inserted into the worksheet.

Now let me show you where Excel did the flip. I scroll down and find this column blank.

When I checked the website I found that there was a chart there which Excel was not able to pull. So, you have to be careful about what you are taking from a web page.

Now, you have got the data and can begin working and manipulating it.

The most important/interesting thing to note here is: you don’t have to pull the updated data from time to time.

How to Refresh Excel Data for Any Update

You can manually or automatically refresh the data. How? Say Abracadabra! No, am just kidding. (But it’s almost like magic).

Click on the drop-down part of the Refresh All command.

You can click on Refresh if you think you have only one data and you can click on Refresh All if you think you have more than one data to be refreshed.

You can even set a time period for refreshing data automatically. Click on this Connection Properties option from the list.

Connection Properties dialog box appears.

You can name the connection. Add a description to it.

Under Refresh Control, you get a command Refresh Every (by default 60 minutes), you can change it.

Or you can choose the option Refresh Data when opening the file. I click OK. So, the data of this worksheet will be updated when I will open the worksheet.

Read More:

So, this is how you can pull data from a web page, manipulate the data in your own way, and then you can set when the data will be updated automatically.

Cool, right? Now time for a coffee!!

Hello!
Welcome to my Excel blog! It took me some time to be a fan of Excel. But now I am a die-hard fan of MS Excel. I learn new ways of doing things with Excel and share here. Not only how to guide on Excel, but you will get also topics on Finance, Statistics, Data Analysis, and BI. Stay tuned!
-->

Microsoft Excel is one of the most widely used business applications around. It’s also one of the most common ways to get your data into Power BI.

What types of workbooks does Power BI support?

Power BI supports importing or connecting to workbooks created in Excel 2007 and later. Workbooks must be saved as .xlsx or .xlsm file type and be under 1 GB. Some features described in this article are only available in later versions of Excel.

Workbooks with ranges or tables of data

If your workbook has simple worksheets with ranges of data, to get the most out of your data in Power BI, be sure to format those ranges as tables. This way, when creating reports in Power BI, you’ll see named tables and columns in the Fields pane, making it much easier to visualize your data.

Workbooks with data models

Workbooks can contain a data model with one or more tables of data loaded into it by using linked tables, Power Query (Get & Transform in Excel 2016), or Power Pivot. Power BI supports all data model properties such as relationships, measures, hierarchies, and KPIs.

Note

Online

Workbooks with data models cannot be shared across Power BI tenants. For example, a user who logs in to Power BI using a contoso.com account cannot share an Excel workbook with a user who logs in using a Power BI login account from woodgrovebank.com.

Workbooks with connections to external data sources

If you use Excel to connect to an external data source, once your workbook is in Power BI, you can create reports and dashboards based on data from that connected data source. You can also setup Scheduled Refresh to automatically connect right to the data source and get updates. You’ll no longer need to refresh manually from the Data ribbon in Excel. Any visualizations in reports and tiles in dashboards based on data from that data source are updated automatically. To learn more, see Data refresh in Power BI.

Workbooks with Power View sheets, PivotTables and charts

How your PowerView sheets and PivotTables and charts appear, or not appear, in Power BI depends on where your workbook file is saved and how you choose to get it into Power BI. We'll go into this more below.

Data types

Power BI supports the following data types: Whole Number, Decimal Number, Currency, Date, True/False, Text. Marking data as specific data types in Excel will improve the Power BI experience.

Prepare your workbook for Power BI

Watch this helpful video to learn more about how to make sure your Excel workbooks are ready for Power BI.

Where your workbook file is saved makes a difference

Local - If you save your workbook file to a local drive on your computer or another location in your organization, from Power BI you can load your file into Power BI. Your file will actually remain on your local drive, so the whole file isn’t really imported into Power BI. What really happens is a new dataset is created in Power BI and data and the data model (if any) from the workbook are loaded into the dataset. If your workbook has any Power View sheets, those will appear in your Power BI site under Reports. Excel 2016 also has the Publish feature (under the File menu). Using Publish is effectively the same as using Get Data > Files > Local File from Power BI, but is often easier to update your dataset in Power BI if you’re regularly making changes to the workbook.

OneDrive - Business – If you have OneDrive for Business and you sign into it with the same account you sign into Power BI with, this is by-far the most effective way to keep your work in Excel and your dataset, reports, and dashboards in Power BI in-sync. Because both Power BI and OneDrive are in the cloud, Power BI connects to your workbook file on OneDrive about every hour. If any changes are found, your dataset, reports, and dashboards are automatically updated in Power BI. Just like if you saved your workbook to a local drive, you can also use Publish to update your dataset and reports in Power BI immediately; otherwise Power BI will automatically synchronize, usually within an hour.

OneDrive - Personal – If you save your workbook files to your own OneDrive account, you’ll get many of the same benefits as you would with OneDrive for Business. The biggest difference is when you first connect to your file (using Get Data > Files > OneDrive – Personal) you’ll need to sign in to your OneDrive with your Microsoft account, which is usually different from what you use to sign in to Power BI. When signing in with your OneDrive with your Microsoft account, be sure to select the Keep me signed in option. This way, Power BI will be able to connect to your workbook file about every hour and make sure your dataset and reports in Power BI are in-sync.

SharePoint Team-Sites – Saving your Power BI Desktop files to SharePoint – Team Sites is much the same as saving to OneDrive for Business. The biggest difference is how you connect to the file from Power BI. You can specify a URL or connect to the root folder.

One Excel workbook – two ways to use it

If you save your workbook files to OneDrive, you'll have a couple of ways you can explore your data in Power BI

Import Excel data into Power BI

When you choose Import, any supported data in tables and/or a data model are imported into a new dataset in Power BI. If you have any Power View sheets, those will be re-created in Power BI as reports.

You can continue editing your workbook. When your changes are saved, they’ll be synchronized with the dataset in Power BI, usually within about an hour. If you need more immediate gratification, you can just click Publish again, and your changes are exported right then and there. Any visualizations you have in reports and dashboards will be updated, too.

Choose this option if you’ve used Get & Transform data or Power Pivot to load data into a data model, or if your workbook has Power View sheets with visualizations you want to see in Power BI.

In Excel 2016, you can also use Publish > Export. It's pretty much the same thing. To learn more, see Publish to Power BI from Excel 2016.

Connect, manage and view Excel in Power BI

When you choose Connect, your workbook will appear in Power BI just like it would in Excel Online. But, unlike Excel Online, you’ll have some great features to help you pin elements from your worksheets right to your dashboards.

You can’t edit your workbook in Power BI. But if you need to make some changes, you can click Edit, and then choose to edit your workbook in Excel Online or open it in Excel on your computer. Any changes you make are saved to the workbook on OneDrive.

Choose this option if you only have data in worksheets, or you have ranges, PivotTables and charts you want to pin to dashboards.

In Excel 2016, you can also use Publish > Upload. It's pretty much the same thing. To learn more, see Publish to Power BI from Excel 2016.

Import or connect to an Excel workbook from Power BI

  1. In Power BI, in the nav pane, click Get Data.

  2. In Files, click Get.

  3. Find your file.

  4. If your workbook file is on OneDrive or SharePoint - Team Sites, choose Import or Connect.

Ms Excel Online Use

Local Excel workbooks

You can also use a local Excel file and upload it into Power BI. Simply select Local File from the previous menu, then navigate to where you have your Excel workbooks saved.

Once selected, choose to Upload your file into Power BI.

Once your workbook is uploaded, you get a notification that the workbook is ready.

Once the workbook is ready, you can find it in the Reports section of Power BI.

Publish from Excel 2016 to your Power BI site

Using the Publish to Power BI feature in Excel 2016 is effectively the same as using Get Data in Power BI to import or connect to your file. We won't go into the details here, but you can see Publish to Power BI from Excel 2016 to learn more.

Troubleshooting

Workbook file too big? Check out Reduce the size of an Excel workbook to view it in Power BI.

Currently, when you choose Import, Power BI only imports data that is part of a named table or a data model. As a result, if the workbook contains no named tables, Power View sheets, or Excel data models, you might see this error: 'We couldn't find any data in your Excel workbook'. This article explains how to fix your workbook and re-import it.

Microsoft Excel For Free Online

Next steps

How To Use Excel Online

Explore your data - Once you get data and reports from your file into Power BI, it's time to explore. Just right-click the new dataset and then click Explore. If you chose to connect to a workbook file on OneDrive in step 4, your workbook will appear in Reports. When you click on it, it will open in Power BI, just as it would if it were in Excel Online.

Learning To Use Excel online, free

Schedule refresh - If your Excel workbook file connects to external data sources, or you imported from a local drive, you can setup scheduled refresh to make sure your dataset or report is always up-to-date. In most cases, setting up scheduled refresh is quite easy to do, but going into the details is outside the scope of this article. See Data refresh in Power BI to learn more.