I have written an applescript program that seems only to work on certain websites. I am trying to take the pageSource of website and transfer it to excel.
tell application "Safari"
open location "http://www.microsoft.com/mac/developers/default.mspx?CTT=PageView&clr=99-21-0&target=b2656752-dbbb-494e-ad09-031d08e7bc8e1033&srcid=cdb9a274-738f-4e4a-9e8c-83feda0485241033&ep=7"
set pSource to the source of the front document
end tell
tell application "Finder"
activate
open document file "Sorting Info.xls" of folder "Research Data" of folder "Desktop" of folder "Rich" of folder "Users" of startup disk
end tell
tell application "Microsoft Excel"
activate
activate object workbook "Sorting Info.xls"
activate object worksheet "Sheet1"
set theRange to range "A1:A100" of sheet 1 of active workbook
set value of active cell to pSource
end tell
However, if i usedhttp://www.google.com or http://finance.google.com/finance?q=ABC the data doesn't seem to transfer
Can anyone help me figure out what is going wrong?
Also, I would appreciate it if someone could help me figure out how to make one line of the page Source appear as one cell in Excel
tell application "Safari"
open location "http://www.microsoft.com/mac/developers/default.mspx?CTT=PageView&clr=99-21-0&target=b2656752-dbbb-494e-ad09-031d08e7bc8e1033&srcid=cdb9a274-738f-4e4a-9e8c-83feda0485241033&ep=7"
set pSource to the source of the front document
end tell
tell application "Finder"
activate
open document file "Sorting Info.xls" of folder "Research Data" of folder "Desktop" of folder "Rich" of folder "Users" of startup disk
end tell
tell application "Microsoft Excel"
activate
activate object workbook "Sorting Info.xls"
activate object worksheet "Sheet1"
set theRange to range "A1:A100" of sheet 1 of active workbook
set value of active cell to pSource
end tell
However, if i usedhttp://www.google.com or http://finance.google.com/finance?q=ABC the data doesn't seem to transfer
Can anyone help me figure out what is going wrong?
Also, I would appreciate it if someone could help me figure out how to make one line of the page Source appear as one cell in Excel