To begin, im starting to feel the limitations of VBS and am doubting whether this is possible, but maybe someone better-versed in VB than I can answer the question. I have a simple VB Script that logs into a website i access daily and i need it to pull values from a table on this website. I can provide some of the code on request, but the only piece im having issues with really is the pulling of the table data into excel (and format it!).
Right now i am using a very simple action to copy the entire html text into a txt file, but that is not the output i am looking for.
PageCache = objIE.document.body.innerHTML
Set objFileSystem = CreateObject(“Scripting.fileSystemObject”)
Set objOutputFile = objFileSystem.CreateTextFile(“C:\MyFolder\Output.txt”, TRUE)
objOutputFile.WriteLine(PageCache)
objOutputFile.Close
I want to use this functionality in conjunction with this:
Set objExcel = CreateObject(“Excel.Application”)
‘Copy the text values in the table here and format the table in excel (this is the code im looking for)
‘Save the file and quit
Set objWorkbook = objExcel.Workbooks.Add()
objWorkbook.SaveAs(“Test Output”)
objExcel.Workbooks.Close
objExcel.quit
So the question is, is there a way in which this could be done, and how could i do it. I would rather just stick with VB (im a beginner) but if i must use some other options, im open to them.
Thank you all in advance! This one is stumping me!