locked
Hiding file extension in sharepoint online document library RRS feed

  • Question

  • In sharepoint online the document library displays the file extension (.pdf, .xls, .aspx etc). Is there an easy way to hid the extensions? It didn't used to disolay prior to sharepoint online.

    Thanks. 

     
    Thursday, July 23, 2020 1:34 PM

All replies

  • Hi J-Bal,

    I’m afraid there is no OOB settings to hide the file extension in a document library for the time being. It is the default behavior for SharePoint modern experience (SPO and also SharePoint Server 2019). The file extension following the filename is automatically generated by SharePoint according to the property “File Type” and cannot be modified or removed.

    As a workaround, you can set the libraries to use classic experience so that the file extensions get hidden by default.

    You can also hide the file extension with column formatting by adding JSON via Column > Column settings > Format this column:

    {
       "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
       "elmType": "div",
       "txtContent": "=if(indexOf('@currentField','.') > 0,substring('@currentField',0,indexOf('@currentField','.')),'@currentField')"
    }
    
    

    Please note that this method will remove the ellipsis menu as well as hove panels for the documents, and the documents will need double clicking to open directly.

    ---

    This “Microsoft Online: SharePoint Online” Forum will be migrating to a new home on Microsoft Q&A, please refer to this sticky post for more details.

    Best regards,

    Chelsea Wu

    Friday, July 24, 2020 2:30 AM
  • Hi,

    Please remember to update this thread if you have any progress.

    Thank you for your understanding.

    Best regards,

    Chelsea Wu

    "SharePoint" forums will be migrating to a new home on Microsoft Q&A !
    We invite you to post new questions in the "SharePoint" forums' new home on Microsoft Q&A !

    Tuesday, July 28, 2020 1:34 AM
  • Hi,

    This forum will be locked down, if you need further assistance with this issue, you can continue to post in here before 8/10/2020. It is recommended to create a new question on Microsoft Q&A, we will continue to support you on the new home.

    Thank you for your understanding.

    Best regards,

    Chelsea Wu

    "SharePoint" forums will be migrating to a new home on Microsoft Q&A !
    We invite you to post new questions in the "SharePoint" forums' new home on Microsoft Q&A !

    Tuesday, August 4, 2020 2:26 AM