I have 3 html files test1, test2 and test3. I want to load these 3 files into one Excel Workbook and each HTML file on seperate sheets test1, test2 and test3. I want to use Delphi and OLE automation. Perhaps more of this in VB but I cannot find a Delphi code
Thanks
As I mentioned in a comment, if you attempt to load an .Html file into a WorkBook, Excel will remove the existing WorkSheets from the WorkBook and then load the .Html into a new, single, sheet, so if you tried to open multiple .Html files in the same WorkBook, you'd end up with only the lasted one loaded. Not all .Html files seem to be digestible by Excel, btw, and it often complains about things such as being unable to access necessary .Css files.
So, the code below does what I think you want by loading the .Html files into separate WorkBooks and then copies the single worksheet of the second to Nth .Html files into the first one, which it saves in C:\Temp. Hopefully the code should be reasonably self-explanatory, but if in doubt, ask. I've only shown processing the 1st & 2nd .Html files because you'd just repeat the steps for the 2nd one for the 3rd to Nth.