Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Using Script to download from secure site

Hello all! Is it possible to configure a script in Excel that will download
a dynamic report from a secure site? We have a list of vendors that is
updated regularly from our service supplier, and a report posted in Crystal
Reports to the secure extranet. I'd like to use a script in Excel to open
the appropriate page, sign in using my credentials, browse to the report and
import the results into a spreadsheet, then comare the newly generated list
against our internal list to see if any of the changes pertain to us. Is
this possible? MS says that the web query doesn't work from secure sites,
but I'm wondering if I can program the script to some kind of step-by-step
instructions that would enter the commands as if I were at my keyboard.
Appreciate any help,
GP
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default Using Script to download from secure site

This can be done, but it is tricky. If you send me some details I
could help you out.

I would start by modifying this function I use:

Function Get_Online_Report()
Dim ie As Object
Set ie = CreateObject("InternetExplorer.Application")
With ie
.Visible = True
.navigate "https://Your Site Name Here"
Do Until .readystate = 4
DoEvents
Loop
With .document.forms(0)
.Item("UserName").Value = "Your UserName Here"
.Item("Password").Value = "Your Password Here"
.Item("The Submit Button").Click
End With
End With
Set ie = Nothing
End Function

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Using Script to download from secure site

Dave,
I have the same problem as you were discussing below, downloading my account
data from my secure broker's site. I tried both Web Query and Macro and got
stopped right at the login step. Can I use your script and how do I run it in
my case, since I have to login then go to another page and download from that
page data that is only contained in one frame?

Thanks for your help.
--
XL Baby


"Dave Miller" wrote:

This can be done, but it is tricky. If you send me some details I
could help you out.

I would start by modifying this function I use:

Function Get_Online_Report()
Dim ie As Object
Set ie = CreateObject("InternetExplorer.Application")
With ie
.Visible = True
.navigate "https://Your Site Name Here"
Do Until .readystate = 4
DoEvents
Loop
With .document.forms(0)
.Item("UserName").Value = "Your UserName Here"
.Item("Password").Value = "Your Password Here"
.Item("The Submit Button").Click
End With
End With
Set ie = Nothing
End Function


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default Using Script to download from secure site

Again, I would need a specific site inorder to help you out.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Using Script to download from secure site

Dave,
The specific site is:
www.schwab.com
Thanks.
--
XL Baby


"Dave Miller" wrote:

Again, I would need a specific site inorder to help you out.




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default Using Script to download from secure site

XL Baby,

This should work for you, watch out for word wrap though:

-just change the variable to your username and password

Regards,
David Miller

Function Get_Online_Report()
Dim ie, Form As Object, _
sUserName, sPassword As String

Set ie = CreateObject("InternetExplorer.Application")

sUserName = "Your User Name"
sPassword = "Your Password"

With ie
.Visible = True
.navigate "https://investing.schwab.com/trading/start?kc=y"
Do Until .readystate = 4
DoEvents
Loop
On Error Resume Next
With .Document.Forms
For I = 0 To .Length - 1
If .Item(I).Name = "SignonForm" Then
Set Form = .Item(I)
End If
Next
With Form
For I = 0 To .Length - 1
With .Item(I)
Select Case .Name
Case "SignonAccountNumber"
.Value = sUserName
Case "SignonPassword"
.Value = sPassword
End Select
End With
Next
.Submit
End With
End With
End With
Set ie = Nothing
End Function


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 122
Default Using Script to download from secure site

In many cases, I've found that manually doing a Web Query creates a
cookie that allows me to download data from the site after that with
little or no problem. I have an add-in that extracts financial data
from web pages, so I've had to use it on a few secure pages. But once
the cookie was established via the Web Query, all of the web pages
from that site have been available.

On May 11, 4:14 am, XL Baby wrote:

I have the same problem as you were discussing below, downloading my account
data from my secure broker's site. I tried both Web Query and Macro and got
stopped right at the login step. Can I use your script and how do I run it in
my case, since I have to login then go to another page and download from that
page data that is only contained in one frame?


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Import from a secure site botha Excel Discussion (Misc queries) 1 June 20th 06 07:16 PM
Can't Download Data in Thai Script Victor Viguilla Excel Discussion (Misc queries) 0 June 1st 06 03:51 AM
Download a CSV file from an internet site Microchip Excel Programming 0 March 28th 06 12:41 PM
Looking for Userform examples - site on web, download examples thom hoyle Excel Programming 1 May 10th 05 05:23 PM
Correct a Stock Option Download Script JB[_2_] Excel Programming 1 September 16th 03 03:23 PM


All times are GMT +1. The time now is 07:21 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"