SharePoint - File Operations

Get plain text:

curl -H "Accept: text/plain" https://jugoya.ai/guides/sharepoint/file-operations

Overview

Navigate SharePoint sites, access documents, and download files. Includes Excel Online handling and direct download methods.

URLs

PageURLPurpose
Site Homehttps://{TENANT}.sharepoint.com/sites/{SITE_NAME}Site home page
Documentshttps://{TENANT}.sharepoint.com/sites/{SITE_NAME}/Shared Documents/Document library
Folderhttps://{TENANT}.sharepoint.com/:f:/s/{SITE_NAME}/{FOLDER_ID}Shared folder link

Critical Constraints

  • Authentication Required: Microsoft SSO/OAuth - may require manual login
  • Office Files Open in Browser: Excel, Word, PowerPoint open in Office Online by default
  • Cell Content Not Accessible: Excel Online cell values cannot be read via accessibility tree
  • Direct Download Preferred: Use ?download=1 parameter for reliable file downloads

URL Type Indicators

SharePoint URLs contain type hints:

URL ContainsFile Type
/:x:/Excel
/:p:/PowerPoint
/:w:/Word
/:b:/PDF/Other
/:f:/Folder

Workflow: Navigate to Site

1. Access Site URL

Navigate to https://{TENANT}.sharepoint.com/sites/{SITE_NAME}

2. Handle Authentication

If redirected to login:

  1. Complete Microsoft SSO/OAuth flow
  2. May require MFA verification

3. Verify Site Loaded

Check for:

  • Site name in header
  • Navigation menu visible
  • Document libraries listed

Workflow: Download File (Direct URL)

The most reliable download method uses the ?download=1 parameter.

1. Get File URL

Obtain the SharePoint file URL (from sharing link or browser address bar).

2. Modify URL for Download

Add ?download=1 to the URL:

Original: https://{TENANT}.sharepoint.com/:x:/r/sites/.../file.xlsx?d=xxx&csf=1&web=1
Download: https://{TENANT}.sharepoint.com/:x:/r/sites/.../file.xlsx?download=1

3. Navigate to Download URL

Open the modified URL. The file downloads automatically.

Workflow: Download via UI

If direct URL download is not available:

1. Open File Menu

Click the three-dot menu next to the file, or open the file and access the File menu.

2. Select Download Option

Look for "Download" or "Download a Copy" option.

3. Confirm Download

Click to start the download.

Workflow: Open Excel File

1. Click File Name

Click the Excel file in the document library. It opens in Excel Online.

2. Handle New Tab

Excel Online may open in a new browser tab.

3. Navigate Sheets

Sheet tabs appear at the bottom of the Excel Online interface.

Excel Online Limitations

Cell Content Not Accessible

Excel Online renders cells as canvas/graphics. Individual cell values cannot be read programmatically via the accessibility tree.

Workarounds

  • Search (Ctrl+F): Use Find dialog to search for specific values
  • Download: Download the file for local processing
  • Direct URL Download: Use ?download=1 for automation

Search in Excel Online

  1. Press Ctrl+F to open Find dialog
  2. Enter search term
  3. Navigate through results

Page Structure Reference

Document Library Elements

ElementDescription
File/folder rowsList items with name, modified date, author
Column headersSort by name, date, etc.
New buttonCreate new document or folder
Upload buttonUpload files
Three-dot menuFile actions (download, share, delete)

Excel Online Elements

ElementDescription
RibbonToolbar with formatting options
Formula barShows cell content/formula
Sheet tabsNavigate between worksheets
Cell gridSpreadsheet content (not accessible)
File menuSave, download, share options

Troubleshooting

IssueCauseSolution
Redirected to loginSession expiredComplete Microsoft authentication
File opens in browserDefault Office Online behaviorUse ?download=1 URL or download menu
Cannot read cell valuesExcel Online limitationDownload file or use Ctrl+F search
Download not startingURL format issueVerify ?download=1 is appended correctly
Access deniedPermission issueVerify sharing permissions with site owner

Notes

  • Tenant name is typically your organization's domain prefix
  • Site names are URL-encoded (spaces become %20 or hyphens)
  • Shared links contain encoded folder/file IDs
  • Large files may take time to download
  • Excel Online supports basic editing but some features require desktop app