Pass Parameter from Excel to SharePoint

I’m trying to open an Excel file from SharePoint.  Here is a the scenario.  
I’d like to be able to pass a parameter from excel to SharePoint, and have 
SharePoint identify if the file exists on my SharePoint site.  For instance, 
here is the generic URL:
https://collaboration.net/sites/Documents/Forms/AllItems.asp

What I want to be able to do is pass a file name as a Parameter, and open 
the appropriate Excel file with the same name, so it may be something like 
this:
https://collaboration.net/sites/Documents/Forms/AllItems.asp?test=5262010.xls

It will always be the URL and the word ‘test’ and the file name, which is 
unique because it is an AccountID.

I’ve imported from HTML sources, and aspx sources, many times, and even 
exported from Excel to HTML, but I’m not an expert in this area, and I’m not 
really sure how it will work with SharePoint.  Any thoughts?  I’d greatly 
appreciate any input on this.

Thanks,
Ryan--


-- 
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.
0
Utf
5/27/2010 8:57:20 PM
excel.programming 6508 articles. 2 followers. Follow

3 Replies
1291 Views

Similar Articles

[PageSpeed] 26

Some additional code that may be useful
         For ii = LBound(asd) To UBound(asd)
            Debug.Print Dir(asd(ii))
              'open the file 
              Application.Workbooks.Open (asd(ii)), False, True

              'Get file path from file name
              FPath = Left(fil, Len(fil) - Len(Split(fil, 
"\")(UBound(Split(fil, "\")))) - 1)

                fil = asd(ii)

              'Get file path from file name
              FPath = Left(fil, Len(fil) - Len(Split(fil, 
"\")(UBound(Split(fil, "\")))) - 1)

              'Get file information
              If Left$(fil, 1) = Left$(fldr, 1) Then
                  If CBool(Len(Dir(fil))) Then
                      z = z + 1
                      ws.Cells(z + 1, 1).Resize(, 6) = _
                      Array(Dir(fil), LocName, RowsOfData, 
Round((FileLen(fil) / 1000), 0), FileDateTime(fil), FPath)
                      DoEvents
                      With ws
                          .Hyperlinks.Add .Range("A" & CStr(z + 1)), fil 
'.FoundFiles(i)
                      End With
                  End If
              End If


"ker_01" wrote:

>     fldr = "\\share.companyname.com\folder\subfolder\"
>      
>     'asd is a 1-D array of files returned in XL2003, syntax untested in XL2007
>     asd = ListFiles(fldr, True)
> 
> HTH,
> Keith
> 
> "ryguy7272" wrote:
> 
> > I’m trying to open an Excel file from SharePoint.  Here is a the scenario.  
> > I’d like to be able to pass a parameter from excel to SharePoint, and have 
> > SharePoint identify if the file exists on my SharePoint site.  For instance, 
> > here is the generic URL:
> > https://collaboration.net/sites/Documents/Forms/AllItems.asp
> > 
> > What I want to be able to do is pass a file name as a Parameter, and open 
> > the appropriate Excel file with the same name, so it may be something like 
> > this:
> > https://collaboration.net/sites/Documents/Forms/AllItems.asp?test=5262010.xls
> > 
> > It will always be the URL and the word ‘test’ and the file name, which is 
> > unique because it is an AccountID.
> > 
> > I’ve imported from HTML sources, and aspx sources, many times, and even 
> > exported from Excel to HTML, but I’m not an expert in this area, and I’m not 
> > really sure how it will work with SharePoint.  Any thoughts?  I’d greatly 
> > appreciate any input on this.
> > 
> > Thanks,
> > Ryan--
> > 
> > 
> > -- 
> > Ryan---
> > If this information was helpful, please indicate this by clicking ''Yes''.
0
Utf
5/27/2010 8:30:43 PM
    fldr = "\\share.companyname.com\folder\subfolder\"
     
    'asd is a 1-D array of files returned in XL2003, syntax untested in XL2007
    asd = ListFiles(fldr, True)

HTH,
Keith

"ryguy7272" wrote:

> I’m trying to open an Excel file from SharePoint.  Here is a the scenario.  
> I’d like to be able to pass a parameter from excel to SharePoint, and have 
> SharePoint identify if the file exists on my SharePoint site.  For instance, 
> here is the generic URL:
> https://collaboration.net/sites/Documents/Forms/AllItems.asp
> 
> What I want to be able to do is pass a file name as a Parameter, and open 
> the appropriate Excel file with the same name, so it may be something like 
> this:
> https://collaboration.net/sites/Documents/Forms/AllItems.asp?test=5262010.xls
> 
> It will always be the URL and the word ‘test’ and the file name, which is 
> unique because it is an AccountID.
> 
> I’ve imported from HTML sources, and aspx sources, many times, and even 
> exported from Excel to HTML, but I’m not an expert in this area, and I’m not 
> really sure how it will work with SharePoint.  Any thoughts?  I’d greatly 
> appreciate any input on this.
> 
> Thanks,
> Ryan--
> 
> 
> -- 
> Ryan---
> If this information was helpful, please indicate this by clicking ''Yes''.
0
Utf
5/27/2010 8:46:40 PM
Thanks ker!  I don't think I really understand where you're going with this.  
Can you please elaborate?  I'm thinking of something like this:
http://finance.yahoo.com

Then pass a value to the URL, so I get something like this...
http://finance.yahoo.com/q?s=ibm
http://finance.yahoo.com/q?s=msft
http://finance.yahoo.com/q?s=ko

It's for my own site, though; not Yahoo!
Basically, I want to pass the parameter to the SharePoint site, and the 
results are displayed, or even better, an Excel file that is already stored 
on the site, is opened when a user enters an account number (the account 
number should match the file that is stored on the SharePoint site).

Thanks so much!!
Ryan--

-- 
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"ker_01" wrote:

> Some additional code that may be useful
>          For ii = LBound(asd) To UBound(asd)
>             Debug.Print Dir(asd(ii))
>               'open the file 
>               Application.Workbooks.Open (asd(ii)), False, True
> 
>               'Get file path from file name
>               FPath = Left(fil, Len(fil) - Len(Split(fil, 
> "\")(UBound(Split(fil, "\")))) - 1)
> 
>                 fil = asd(ii)
> 
>               'Get file path from file name
>               FPath = Left(fil, Len(fil) - Len(Split(fil, 
> "\")(UBound(Split(fil, "\")))) - 1)
> 
>               'Get file information
>               If Left$(fil, 1) = Left$(fldr, 1) Then
>                   If CBool(Len(Dir(fil))) Then
>                       z = z + 1
>                       ws.Cells(z + 1, 1).Resize(, 6) = _
>                       Array(Dir(fil), LocName, RowsOfData, 
> Round((FileLen(fil) / 1000), 0), FileDateTime(fil), FPath)
>                       DoEvents
>                       With ws
>                           .Hyperlinks.Add .Range("A" & CStr(z + 1)), fil 
> '.FoundFiles(i)
>                       End With
>                   End If
>               End If
> 
> 
> "ker_01" wrote:
> 
> >     fldr = "\\share.companyname.com\folder\subfolder\"
> >      
> >     'asd is a 1-D array of files returned in XL2003, syntax untested in XL2007
> >     asd = ListFiles(fldr, True)
> > 
> > HTH,
> > Keith
> > 
> > "ryguy7272" wrote:
> > 
> > > I’m trying to open an Excel file from SharePoint.  Here is a the scenario.  
> > > I’d like to be able to pass a parameter from excel to SharePoint, and have 
> > > SharePoint identify if the file exists on my SharePoint site.  For instance, 
> > > here is the generic URL:
> > > https://collaboration.net/sites/Documents/Forms/AllItems.asp
> > > 
> > > What I want to be able to do is pass a file name as a Parameter, and open 
> > > the appropriate Excel file with the same name, so it may be something like 
> > > this:
> > > https://collaboration.net/sites/Documents/Forms/AllItems.asp?test=5262010.xls
> > > 
> > > It will always be the URL and the word ‘test’ and the file name, which is 
> > > unique because it is an AccountID.
> > > 
> > > I’ve imported from HTML sources, and aspx sources, many times, and even 
> > > exported from Excel to HTML, but I’m not an expert in this area, and I’m not 
> > > really sure how it will work with SharePoint.  Any thoughts?  I’d greatly 
> > > appreciate any input on this.
> > > 
> > > Thanks,
> > > Ryan--
> > > 
> > > 
> > > -- 
> > > Ryan---
> > > If this information was helpful, please indicate this by clicking ''Yes''.
0
Utf
5/27/2010 9:21:51 PM
Reply:

Similar Artilces:

Is It Possible To Pass Parameters to A Pass Through Query
My assumption is that's it's not. At work I use ODBC to connect to our oracle database with Access 2003. There are cases where using a pass through query runs much much faster and I then use it in a make table query to make a local table. In access you can use brackets [] to have it ask for input. May I assume there is no way to do anything like that in a pass through query? Create a PassThrough query and use code to assign the SQL to this query filtering it with a parameter, and then run it e.g Dim MyVariable As Integer MyVariable = InputBox("Please select a Number&quo...

Report Parameter not displaying correct results
Hey there, I have a parameter form that you can choose a Description from or ALL. Its based on this query: SELECT Description, 1 AS SortColumn FROM Study UNION SELECT "All", 0 FROM Study ORDER BY SortColumn, [Description]; When I choose ALL I get no data on my report when there is data. MY RecordSource for the report is: SELECT Study.Description, Study.Product, Study.Dosage FROM Study WHERE ((Study.Description)=forms!SelectTrial!txtDescription) OR((forms!SelectTrial!txtDescription)="ALL") If I choose ALL shouldn't all my Descriptions show up on the ...

Excel 2007 ?
I am currently using Excel 2002. I want to know what's the major difference between Excel 2007 and Excel 2002. Our company is considering about the advantage of the upgrade. Thanks On Mon, 29 Mar 2010 22:27:45 +0800, "Carlson" <davidcarlson@yahoo.com> wrote: >I am currently using Excel 2002. I want to know what's the major difference >between Excel 2007 and Excel 2002. Our company is considering about the >advantage of the upgrade. Microsoft changed EVERYTHING. We converted almost 2 years ago. It took me a year to get used to the ribbon and...

MSN Stock Quotes add-in for excel
I need a link where I can download this aplication (MSN Money stock quotes add-in for excel), I really needed for my investments record. This link thats the one I found on the micrsoft page http://www.microsoft.com/downloads/details.aspx?FamilyID=485FCCD8-9305-4535-B939-3BF0A740A9B1&displaylang=en Does not Work... Please let me know where can I download it. Thanks for your time. I don't use msn but will be happy to provide you with an excel file using Yahoo quotes. I will ONLY respond to requests made to me my email addy below. -- Don Guillett Microsoft MVP...

Excel #151
I have a Purchase Order template that I have to print, then renumber then print again continuously. Is there a formula that make the template automatically number sequentially even thought there is only one sheet? How about using a little macro: Option Explicit Sub testme() Dim iCtr As Long For iCtr = 23 To 38 'whatever you want With Worksheets("sheet1") .Range("a1").Value = iCtr .PrintOut preview:=True End With Next iCtr End Sub I printed from 23 to 38. Change it to what you need. I printed Sheet...

Importing from Excel to Access 2003
Trying to import a spreadsheet called "Service Customers" from Excel 2003 into Access 2003 but keep getting a message that the Microsoft Jet engine cannot locate the file "Service Customers$" - check name and location etc but file exists and is correctly named. Where does this "$" come from? Anyone help with this one please? -- john I don't know why this is happening. Odd things go on between Excel and Access that you have no control over. If you just want to get it imported, I'd try saving the Excel sheet as a CSV and import it that way. -- --R...

Excel spreadsheet Normal Template
Does Excel have a normal template like Word? I would like to set it up with fonts, header/footer etc. but cannot find its location. It is not located on the C:drive\.\.\.\templates like Word. Thanks for your help. Regards Helga Helga, You can create one. Take a workbook, set up the formats as you require, and save it as a template file called Book.xlt in the XLStart directory. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Helga" <anonymous@discussions.microsoft.com> wrote in me...

Auto Starting Excel
Hi Does anyone know if there is a way to have Excel open at a certain time (e.g 0900) and have it open a Macro to run. I have files which are auto loaded to a shared area but need to run the Macro's on them, I cant leave my PC on 24/7 but would like the Excel document to auto-open and run the Macro on a server. Can any one assist? Thanks Drew Use Windows Task Scheduler to start Excel with a shortcut to the workbook in question. Run the macro from a Workbook_Open event in the workbook. Gord Dibben MS Excel MVP On Tue, 1 May 2007 08:07:02 -0700, Drew1707 <Drew1707@discussions...

Excel-Legend
I am new to excel and trying to understand legend factor in a chart. If I selected cells B5:B10 as the data series for a chart, & specified the data series in columns. What is my legend? B5:F5, C6:F10, B5:B10, impossible to determine from info given above. wd, If your series is B5:B10, and "you specified the data series in columns." You have one column of information to plot "B5 down to B10". "wd" wrote: > I am new to excel and trying to understand legend factor in a chart. > If I selected cells B5:B10 as the data series for a chart, & spe...

Linked Reports Parameters
How I can pass data from CRM to a linked Report (such as parametrs to reporting services report: CRM_Url, CRM_FilterText etc). I need to pass entity data (for examle EntityId) on aspx page. This may be what you are looking for. I use it to pass Account ID, Opportunity ID's etc... to my RS reports from buttons in CRM created using the isv.config file. Running CRM - MS SQL Reporting Services (RS) from ISV button and passing in Account/Opportunity GUID parameters to report. Here is a method of running an RS report from CRM and passing in the GUID from the record you are on to the RS re...

Date query "Excel VBA"
Is there anyway i can use vba code to create a user input box on a sale worksheet that will filter the sales orders and only display the order that equal the date entered into the input box by the end user. I am already using the autofilter feature but would like to take it on step further and make it easier for the admin clerk. Thank-Yo -- Message posted from http://www.ExcelForum.com You didn't like yesterday's suggestion???? http://groups.google.com/groups?threadm=4110273A.B3C20CDD%40msn.com "avilla <" wrote: > > Is there anyway i can use vba code to cr...

Pass multiple selected values from list box to table
How do I pass multiple selected values from a list box to a table? I've found code to use the values as criteria in a query but would now like to store the values in a table (at least temporarily) thanks in advance. jack Pass selected values from a list box to a table? I don't really think you want to do this. Can you describe more about what you are trying to accomplish? You just store raw data in a table. You don't store manipulated data in a table. Maybe you need a query to do what you want to do... -- Ryan--- If this information was helpful, please indi...

How to pass an object from C++
Hello! We have a C# asp.net web application that is using a COM dll We use the tlbimp to be able to use the COM dll from C# asp.net web application The method InitRules shown below is located in the COM dll. It can be seen below the text Original. Method InitRules below is called from C# but we want to pass an object of type Handle_DS in addition to all the other parameters. You can see the modified InitRules below marked Modified Note the object of type Handle_DS is a C++ object that is created from C# asp.net application and pass into the InitRules I have also copied the whole idl fil...

Sharepoint Wiki crossreference
Hello there, is there any way to create crossreferences (as in Word) within a Sharepoint wiki page? By this I mean having a link within a page that link to another part (anchor) of the page. I know that this can be done by writing HTML anchor links, but it really go against the point of using a wiki. Thanks, Pascal No, it's not possible. You'll have to use the HTML-style links, as you mentioned. "Pascal" wrote: > Hello there, > > is there any way to create crossreferences (as in Word) within a Sharepoint > wiki page? By this I mean hav...

excel tabs #3
Hi, is there any keyboard shortcut I can use to switch between tabs in single excel file? thanx alek_mil Ctrl + Page Up Ctrl + Page Down hth knut "alekm" <alekm@discussions.microsoft.com> skrev i melding news:ACA27D64-675F-4967-B840-69B0FA9213FD@microsoft.com... > Hi, > is there any keyboard shortcut I can use to switch between tabs in single > excel file? > thanx > > alek_mil ...

100% Passing Guaranteed in All I.T. Exams/Certifications at 1st Attempt Hi Friends, To pass all types of I.T Exams/Certifications with mind blowing results in 1st attempt just visit http://www.itreal
100% Passing Guaranteed in All I.T. Exams/Certifications at 1st Attempt Hi Friends, To pass all types of I.T Exams/Certifications with mind blowing results in 1st attempt just visit http://www.itrealexams.com/ and get real time Q&As, Brain Dumps, Real Exams, Study material, E-Books, Video Exams and Labs for your all type of I.T Certification Exams. ...

Making form using Excell Help ASAP!
I've made a form. This needs to be filled out online. I can freeze cells so the user cannot mess with them, but how do I form lines.? Say, a line above 'Customer Name' in order to answer that question. This is really getting to me b/c it seems like it should be so easy... Hi Amanda not really sure what you're after but if you click in a cell and choose format / cells and click on the border tab and then the top line icon does this give you what you want? Cheers JulieD "~Amanda~" <~Amanda~@discussions.microsoft.com> wrote in message news:26819D...

Excel Spreadsheet #5
How do I delete extra pages? pages? Rows or Tabs(sheets)? -- Don Guillett Microsoft MVP Excel SalesAid Software dguillett1@austin.rr.com "Robbie" <Robbie@discussions.microsoft.com> wrote in message news:666E6731-5F1B-4DF8-B011-F10B7025D97C@microsoft.com... > How do I delete extra pages? I second Don's question - what do you mean by pages - pages in the printout or sheet tabs, or something else? You delete a sheet by right-click the sheet tab and choosing Delete. -- If this helps, please click the Yes button. Cheers, Shane Devenshire "Robbie" wrot...

Excel 2000 Custom Menu Item
I'm running Excel 2000. When I start Excel another Menu item is inserted called Data Warehouse. This item attaches to an SQL database that allows user to select columns for retreival. I need to make some changes to menu item. How do I view the VBA code for this menu item? How does it get loaded when Excel starts? How can I in Excel find out where the code is being loaded from? Thanks ...

post CString as message parameter
What is the best way to pass CString as message parameters? For example CString mystring; CMyWindow::PostMessage(MY_MESSAGE, (WPARAM)mystring, (LPARAM)0)? Thanks, John homecurr@yahoo.com wrote: > What is the best way to pass CString as message parameters? For example > > CString mystring; > CMyWindow::PostMessage(MY_MESSAGE, (WPARAM)mystring, (LPARAM)0)? > > Thanks, > > John If your application has the need to do this, I *strongly* recommend you evaluate your design. It poses all kinds of problems, like where and how do you allocate memory? Where and how do ...

copying Word-Table to Excel
When copying a table (where a table item contains formatted text with "line breaks") to Excel, each "line break" generates a new sub-row and not, as wanted, an equivalent "line break" in the corresponding excel cell (which can be generated manually by pressing ALT+ENTER). How can I reach this? Is it, alternativly, possible to generate the ALT+ENTER in Excel automaticly by using a special control caracter in the "replace" field of the search&replace function? Peter If you change the table in Word to use a special character instead of a carri...

loading excel tables
We are moving our factbook to publisher. Is there a way to link excel files to publisher? How about linking a bunch of files at the same time? Thanks In news:185f601c44a45$66e2b970$a001280a@phx.gbl, UNL user <anonymous@discussions.microsoft.com> posted: > We are moving our factbook to publisher. Is there a way to > link excel files to publisher? How about linking a bunch > of files at the same time? Thanks Linking the Excel files in what manner? So the actual Excel workbook is displayed in Publisher? So there is a hyperlink to a location on your local hard drive? So ther...

Locating Info In New Excel Spreadsheet When Compared To Old One
Hello, I'm a neophyte regarding Excel spreadsheets, so the answer to my question may be obvious to those experienced in it. On a semi-weekly basis, I receive an Excel spreadsheet that is identical in every way to the previous one except that new cells have been added. Neither I nor the sender of the spreadsheet has any control over where the new cells will be added within the file. With some files having over 22,000 cells, it's extremely difficult and time-consuming to visually search for those cells which are new. Each cell, whether new or old, has info, including d...

Addresses from Excel
Hi, I got an Microsoft Excel file with list of emails addresses in it. Is it possible to import or somehow get the email addresses into Outlook so that I don't have to type them in? Also, since I would like them in a group can I do that at the same time? Thanks, AJS AJS wrote: > I got an Microsoft Excel file with list of emails addresses in it. > Is it possible to import or somehow get the email addresses into Outlook so > that I don't have to type them in? Use File -> Import and follow the Wizard: probably best to try it out and see how you get on; then come bac...

IT CertificationzzzZ.....100% GUARANTEED PASS.......!!!@!!!
IT CertificationzzzZ.....100% GUARANTEED PASS.......!!!@!!! Hi guys, If you are serious about your professional career and pass IT Certification exam in first attempt then Visit http://www.FreeExamKing.com and get latest Questions And Answers Dumps for Microsoft, Oracle, Cisco, CompTIA and many more, i have used and found it very helpful. ...