Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Other Programming > VBScript
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
VBScript For questions and discussions related to VBScript.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VBScript section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Closed Thread
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 27th, 2004, 11:20 AM
Friend of Wrox
 
Join Date: Sep 2003
Location: Minneapolis, MN, USA.
Posts: 171
Thanks: 0
Thanked 1 Time in 1 Post
Default Save Browser Content

I am trying to automate a procedure. I have a situation where I must retrieve a spreadsheet from a remote server to update our system. I log into the application select the type of report I need and enter a date range then submit. The results are generated by Cold Fusion (cfm page) in a spreadsheet format.

What I have done is create a script that will start an InternatExplorer.Application, use the IE navigate method to load a form that submits with an onLoad event handler, passing the appropriate UserName and Password to log me in to the app. Then I navigate to the correct URL (with date range parameters) that generates the report I need.

I have two needs:

1) I need a way to save the content from my browser to a specified location, whereby I can query the spreadsheet and update our system automatically. I have tried the ExecWb method, however I cannot select the location that I want to save the file to. By default the file is saved in "My Documents", MOST of the time (ie. not reliable).

My code for saving is as follows:

objIe.ExecWB 4, 2, 0, 0



2) Also when I try to query the spreadsheet, I get an error that says, "External table is not in the expected format". However, when I manually open the file and save it with Excel, I can query it. The connection string that I am using is as follows:

set cn = WScript.CreateObject("Adodb.Connection")
cn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & objFilePath & objFile & ";Extended Properties=""Excel 8.0;HDR=Yes;IMEX=1"";"


Any help with this would be greatly appreciated as I am tired of wracking my brains over this. I know you're all smart so someone should have a solution that they have used. Thanks in advance people. Thanks a ton.

Dave

Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
save content combobox tankfrank35 Beginning VB 6 4 September 26th, 2007 08:16 AM
Send and Receive XML content through browser kj875 ASP.NET 2.0 Basics 0 July 27th, 2007 12:10 AM
how i can save my file content into a table chandanbhakuni Classic ASP Professional 0 July 14th, 2006 07:23 AM
Viewing code rather than content in browser aspnewbie Classic ASP Basics 2 March 27th, 2006 10:47 AM
to save datagrid content to a excel sheet josna VB.NET 1 March 4th, 2006 07:10 AM



All times are GMT -4. The time now is 10:32 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.