ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Pass Parameter from Excel to SharePoint (https://www.excelbanter.com/excel-programming/442879-pass-parameter-excel-sharepoint.html)

ryguy7272

Pass Parameter from Excel to SharePoint
 
Im trying to open an Excel file from SharePoint. Here is a the scenario.
Id 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/Docu...s/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/Docu...st=5262010.xls

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

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

Thanks,
Ryan--


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

ryguy7272

Pass Parameter from Excel to SharePoint
 
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:

Im trying to open an Excel file from SharePoint. Here is a the scenario.
Id 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/Docu...s/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/Docu...st=5262010.xls

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

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

Thanks,
Ryan--


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



All times are GMT +1. The time now is 03:01 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com