The Wizard of Moz
Punishing This Air
- Joined
- Jan 19, 2015
- Messages
- 20,575
- Reaction score
- 33,932
- Points
- 148
Perfect this is exactly what I needed to know. Glad I only got to page 60 in my MATLAB book before askingYou wouldn't use MATLAB or Excel for this.
You'd want to use C#. You could also use phantomJS or any number of automation tools but I'll go over the .NET approach here.
You'll use HTMLAgilityPack from Nuget, you'll then grab the URL for the data you want, you'll then use HTMLAgilityPack (HAP) to navigate the DOM tree to extract the data you want.
From there you'll validate the data is in the correct format, and then you'll do whatever operations you need to perform against the data (maybe in C#, maybe not - depends on the operation and how complex it is).
At that point you'll do one of two things. You'll use NPOI or OpenXML to export your data to your Excel file, or, you'll use Microsoft.Interop.Excel to push the data through COM and into Excel itself. You can automate every function of Excel with the Microsoft.Interop library; although, I recommend against this for most tasks.
Now, if you don't know C#, or any other programming language, then you're likely better off with AutoIT.
https://www.autoitscript.com/site/
Not MATLAB, but you can do this in C# using 3 different methods.
AutoIT Scripts/Macros: This is simplest. You'd write AutoIT scripts that would take you input values (your web scrapped values), and plug them into your application. This is easy as fuck.
Old School: Direct WinAPI hooks. This would hook your applications interface and plug values directly into it either by accessing it's memory or hooking the keyboard. I wouldn't do this if I could avoid it.
Modern Way: .NET WPF UI Automation. This is the best approach for programmatic access via the .NET Framework (C#, etc), and is also well documented. There's no nasty crash-prone hooks, and it should work across frameworks and platforms on any machine running Windows XP SP3 or better. .NET Framework 4.5 needs to be installed on the machine though, AFAIK.
Unless MATLAB is somehow already in the process/workflow and I'm not understanding where, then you've no reason to introduce it as an additional complexity. Unless you're looking to replace the software you're already using for calculation; but it sounds more like you simply want to automate the tasks.
Do you know of any good online resources or any good reference books for learning C#? Also is this a downloaded software, or is it purchased?