Did you want to export links you added to the page or you want to export some file links in SharePoint?
Per my research there is no available way to export links and link name if you want to export links you add to the page.
You could use following PowerShell commands if you just want to export some file links in SharePoint.
PowerShell:
#Set Variables
$SiteURL= "https://tenant.sharepoint.com/sites/Team1"
$ListName="Documents"
$prefix="https://tenant.sharepoint.com"
#Connect to PNP Online
Connect-PnPOnline -Url $SiteURL -Credentials (Get-Credential)
#Get All Items from the specific folder - In batches of 500
$ListItems = Get-PnPListItem -List $ListName -FolderServerRelativeUrl "/sites/Team1/Shared%20Documents/Folder1027" -PageSize 500
#Loop through List Items and Get File URL
$Results=@()
ForEach($Item in $ListItems)
{
$Results += New-Object PSObject -Property @{
FileName = $Item.FieldValues['FileLeafRef']
FileURL = $prefix + $Item.FieldValues['FileRef']
}
}
$Results
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.