PC Review


Reply
Thread Tools Rate Thread

copy sheet from Server URL

 
 
=?Utf-8?B?SmFuaXM=?=
Guest
Posts: n/a
 
      17th Jul 2007
What I'm trying to do is automate the copying of one spreadsheet ("P
History") from a workbook on a Sharepoint server URL and paste to a new
local workbook on a weekly basis.

One problem is the report title:

The title remains the same but they append the date to it. The weekly
report is added to the Sharepoint server every 7 days.
The date is formatted year-monthdate,
for example 07-0717, for today.
Is there a function that will give me the date for each consecutive report?
Somehow I have to calculate the correct one if it is possible in order to
copy the correct sheet.
I don't know if it is possible to copy this report directly off the server?

The second problem is I am not quite sure I have the code right to do the
copy.
-------------------code-----------------------------

Option Explicit
Dim ReportTitle, FilePath As String
Dim ReportDate As Date


Sub CopySharePointSheet()
Set ReportTitle = "My Report Name"
Set ReportDate = 07-????
Set FilePath = "c:\\Temp\"



Set objExcel = CreateObject("Excel.Application")
Set objWorkbook = objExcel.Workbooks.Open(HTTP://my web site/ReportDate
ReportTitle)
objExcel.Visible = True

Set objWorksheet = objWorkbook.Worksheets("P History")
objWorksheet.Copy


ActiveWorkbook.SaveAs Filename:=ReportDate + ReportName + FilePath
'ActiveWorkbook.Close
End Sub



THANKS :-)

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto copy cell data from source sheet to another wrkbook sheet IVLUTA Microsoft Excel Programming 2 2nd Jun 2009 05:07 PM
Auto Copy/autofill Text from sheet to sheet if meets criteria Joyce Microsoft Excel Misc 0 20th Nov 2008 11:05 PM
Copy Paste from Class Sheet to Filtered List on Combined Sheet prkhan56@gmail.com Microsoft Excel Programming 6 16th Sep 2008 04:30 PM
Help: auto-copy entire rows from 1 sheet (based on cell criteria) to another sheet. bertbarndoor Microsoft Excel Programming 4 5th Oct 2007 04:00 PM
relative sheet references ala sheet(-1)!B11 so I can copy a sheet. =?Utf-8?B?Um9uTWM1?= Microsoft Excel Misc 9 3rd Feb 2005 12:51 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:52 PM.