Skip to content

Instantly share code, notes, and snippets.

@matt40k
Created March 16, 2016 12:34
Show Gist options
  • Save matt40k/fd1a660734682ff11749 to your computer and use it in GitHub Desktop.
Save matt40k/fd1a660734682ff11749 to your computer and use it in GitHub Desktop.
TSQL for getting Excel files on SharePoint site
select
REPLACE((d.[DirName] +'/' + d.[LeafName]), ' ', '%20')
from
[dbo].[AllDocs] d
where
extension = 'xlsx'
and IsCurrentVersion = 1
and d.SiteId = (select Top 1 SiteId from dbo.AllWebs where FullUrl = '' order by TimeCreated desc)
@matt40k
Copy link
Author

matt40k commented Mar 16, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment