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/442862-re-pass-parameter-excel-sharepoint.html)

ker_01

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

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