0

I want to archive some old pages from SharePoint Online but unfortunately there is no simple "Download-button" available like the one for the files. Is there a way to download and/or transfer without using PowerShell? If not, what is the best way to get it done via PowerShell?

Thanks in advance.

8 Answers 8

2

Classic SharePoint:

I have mentioned two approaches to download/export files/pages/documents. It will support to both modern and classic SharePoint versions

Approach 1:

Update the below URL with your domain and page parameters

http://sharepoint.com/_layouts/download.aspx?SourceUrl=http://sharepoint.com/pages/test.aspx

Approach 2:

Using SharePoint designer we can export the pages/files. I have attached the screenshot below.

enter image description here

Modern SharePoint:

We have Command bar to download the files/documents/pages in the modern experience. I have attached the screenshot below

enter image description here

4
  • If above answer is satisfying your question then, please accept it so it will help the other people Commented Dec 10, 2019 at 3:16
  • The 1st option (manually typing the URL for "download.aspx?SourceUrl=..." worked great. Thank you!
    – paulsm4
    Commented May 20, 2023 at 18:10
  • 1
    Unfortunatelly nor the first approach neither the second one works for me. There is no download button for anything in page folder. The link to the first url returns an error page.
    – 0014
    Commented Sep 5, 2023 at 13:45
  • In order do enable modern authentification for SharePoint Designer see techcommunity.microsoft.com/t5/microsoft-sharepoint-blog/…
    – Stefan
    Commented Dec 19, 2023 at 12:31
1

If you are using classic SharePoint sites, you will be open the site with SharePoint designer.

If you are using modern SharePoint sites, you can use VScode and SPGo extension.

https://marketplace.visualstudio.com/items?itemName=SiteGo.spgo

Please note that you require to configure your Remote folders in JSON file to access SharePoint online contents.

https://www.youtube.com/watch?v=de2txBruxfA

1
  • SPGo Extension works great
    – lex
    Commented Sep 23, 2020 at 9:31
1

this really needs to be removed or updated. you can't download pages from the Modern SharePoint Online Communications or Teams sites, using either SPGo in VS Code or SharePoint Designer. They are both blocked by Microsoft now.

1

If you are using SharePoint online modern experience, you can use JSON column formatting to download the individual pages.

You can use JSON like:

{
    "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
    "elmType": "button",
    "style": {
        "border-radius": "5px",
        "margin": "5px 0px",
        "padding": "0px",
        "visibility": "=if([$ContentType] == 'Folder', 'hidden', 'visible')"
    },
    "attributes": {
        "class": "ms-bgColor-themePrimary"
    },
    "children": [
        {
            "elmType": "a",
            "txtContent": "Download",
            "style": {
                "text-decoration": "none",
                "padding": "10px 0px",
                "width": "100%"
            },
            "attributes": {
                "href": "= @currentWeb + '/_layouts/15/download.aspx?UniqueId=' + [$UniqueId]",
                "target": "_blank",
                "class": "ms-fontColor-white"
            }
        }
    ]
}

Source: SharePoint Online: Download files using JSON Formatting

Example output:

enter image description here

Documentation: SharePoint column-formatting

0

You can try one of them

  • Site pages are stored in document libraries, you can download them by opening the library in which they are hosted. For example in the
    default team site of SharePoint the home.aspx page is stored in a
    director called 'Site Pages' if you right click the page name in the library you can 'save target as...' this can then be directed to any location you would like. It will save the page for you.
  • You could also download SharePOint Designer and copy the page out of there.
0

If you want to make some customization on SharePoint pages, just use SharePoint Designer. You can add custom css, JS, HTML code to it. What is your goal? Would you like to share us a bit more information for downloading .aspx pages?

0

This works for me

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "button",
  "style": {
    "border-radius": "5px",
    "margin": "5px 0px",
    "padding": "0px",
    "visibility": "=if([$File_x0020_Type] == '', 'hidden', 'visible')"
  },
  "attributes": {
    "class": "ms-bgColor-themePrimary"
  },
  "children": [
    {
      "elmType": "a",
      "txtContent": "Download",
      "style": {
        "text-decoration": "none",
        "padding": "10px 0px",
        "width": "100%"
      },
      "attributes": {
        "href": "= @currentWeb + '/_layouts/15/download.aspx?UniqueId=' + [$UniqueId]",
        "target": "_blank",
        "class": "ms-fontColor-white"
      }
    }
  ]

Source https://github.com/pnp/List-Formatting/tree/master/column-samples/generic-download-file-button

0
  • Open Google Chrome Developer Tools (F12)
  • Go to Sources => Page
  • Right click on File and choose "Save as..."

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.