Import data from web and using button from the web

4 次查看(过去 30 天)
Hi,
I want to be able to use button at webpage to get to another webpage, and extract data from the web.
At the moment i have this in VBA using getElementbyID,getElementbyTagName, etc.
can you please help me in finding the syntax to rewrite this program in matlab?
Alternatively, can I execute the VBA code from Matlab?

回答(1 个)

Kautuk Raj
Kautuk Raj 2024-2-16
I understand that you would like to import data from the web using MATLAB functions. I assume that you are using MATLAB R2023b.
In MATLAB, you can perform web scraping using the built-in "webread", "websave", "webwrite" and "weboptions" functions. These are RESTful web services functions which allow non-programmers to access many web services using HTTP GET and POST methods. More details about them can be found on the documentation page: https://www.mathworks.com/help/matlab/internet-file-access.html
As for executing VBA code from MATLAB, you can use MATLAB's COM Automation Server support to interact with applications that support VBA, such as Excel, and execute VBA scripts within those applications. An example on doing this can be found on this MATLAB Answers post here: https://www.mathworks.com/matlabcentral/answers/100938-how-can-i-run-an-excel-macro-from-matlab

类别

Help CenterFile Exchange 中查找有关 Data Import from MATLAB 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by