I know a couple of ways. I describe two of them.
First Method:
Excel has a built-in data type called Stock that you can use.
StockDataType-0.png
This allows you to do most things with the stock portfolio.
Details here:
https://hodentek.blogspot.com/2020/05/three-easy-steps-to-work-on-your-stock.html
Although you can get most information of a stock, still some data such as 'dividned' is not available. Microsoft may change and add this as well.
Second Method:
It is easy to import financial data from a site such as Yahoo. The following steps show with step-by-step screen shots how you may get the data in the Yahoo's web page. The next screen shown uses the ribbon to get data from WEB.
In the URL type in the Yahoo URL for the Quote page filtering MSFT (Microsoft).
Click OK and you may need to wait it out.
Stick with anonymous. That's OK. I
In the above, click Connect.
Well. have patience.
The Navigator shows up.
All that remains is for you to choose the data in the web page.
The following are the ones for Document, Table1, Table2 and Table 3.
Table 2 has the Dividend information.