Convert Excel to JSON using JavaScript code

Hello friends, in this javascript tutorial we are going to learn about how to Convert Excel to JSON using JavaScript code. We can read an excel file which is hosted on any server, SharePoint folder, etc with the help of javascript code. Here you can get readymade javascript code for Excel to JSON conversion.

Excel to JSON
Excel to JSON

Convert Excel to JSON using JavaScript Code

In this tutorial, we are going to use a js-xlsx library to convert Excel to JSON. It has xlsx.full.min.js file which we are going to refer in our HTML file. js-xlsx is a parser and writer for various spreadsheet formats. So without wasting time lets jump to coding part. We can also use .csv files as well.

Below is a code for reading Excel as a JSON object:

<!doctype html>
<html>

<head>
    <title>Excel to JSON Demo</title>
    <script src="xlsx.full.min.js"></script>
</head>

<body>

    <script>
        /* set up XMLHttpRequest */
        var url = "https://myclassbook.org/wp-content/uploads/2017/12/Test.xlsx";
        var oReq = new XMLHttpRequest();
        oReq.open("GET", url, true);
        oReq.responseType = "arraybuffer";

        oReq.onload = function(e) {
            var arraybuffer = oReq.response;

            /* convert data to binary string */
            var data = new Uint8Array(arraybuffer);
            var arr = new Array();
            for (var i = 0; i != data.length; ++i) arr[i] = String.fromCharCode(data[i]);
            var bstr = arr.join("");

            /* Call XLSX */
            var workbook = XLSX.read(bstr, {
                type: "binary"
            });

            /* DO SOMETHING WITH workbook HERE */
            var first_sheet_name = workbook.SheetNames[0];
            /* Get worksheet */
            var worksheet = workbook.Sheets[first_sheet_name];
            console.log(XLSX.utils.sheet_to_json(worksheet, {
                raw: true
            }));
        }

        oReq.send();
    </script>
</body>

</html>

In the above code, if you could observe, you will find that we have used xlsx.full.min.js file and a Test.xlsx file. We are going to read Test.xlsx Excel file to generate a JSON Object.

Note: While using above code make sure that you have uploaded your Excel file on any server and give the correct full path of that file. You can use the same code to convert CSV to JSON.

Here is our Test.xlsx file which looks like below

Output

When you host your index.html file on the server, on the page load we are running our script to show the objects in the browser console. Below is the output in JSON object

JSON Object output
JSON Object output

Download Excel to JSON javascript

You can use any one of the links to download the source code

  1. MyClassBook: Download
  2. Google Drive: Download
  3. MediaFire: Download

I hope you liked this article. Please let us know if you face any issues in the comment sections below. Like our facebook page and subscribe to our newsletter for future updates. Have a great time! 🙂

Multi Level Cascading Dropdown for Sharepoint Online using REST Api

Hello Friends, in this tutorial we are going to implement Multi Level Cascading Dropdown in SharePoint Online custom Bootstrap form using REST api.

Multi Level Cascading Dropdown in SharePoint Online using REST

We have one list for City which has only one column named Title.

List Name : City
List Name : City

We have one list for State which has only one column named Title

List Name: State
List Name: States

We have one master list for all (Country, state and City) in which we are storing country values in Title field, State is a lookup field in which data is coming from State list, City is also a lookup column in which data is coming fom City list.

List Name: CountryStateCity
List Name: CountryStateCity

We have one custom bootstrap form in which we have 3 dropdowns which are Multi Level Cascading Dropdown, Country, State and City.

Html code:

<html>

<head>
    <title>Contact Form Tutorial by Bootstrapious.com</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="../CustomCode/referenceFiles/bootstrap.min.css" rel="stylesheet">
    <link href='../CustomCode/referenceFiles/googleFonts.css' rel='stylesheet' type='text/css'>
    <link href="../CustomCode/css/CustomCSS.css" rel="stylesheet">
</head>

<body>

    <div class="container">

        <div class="row">

            <div class="col-lg-8 col-lg-offset-2" id="form-body">

                <div id="main-form" role="form">

                    <div class="messages"></div>

                    <div class="controls">

                        <div class="row">
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label for="form_name">Firstname *</label>
                                    <input id="form_name" type="text" name="name" class="form-control" placeholder="Please enter your firstname *">
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label for="form_lastname">Lastname *</label>
                                    <input id="form_lastname" type="text" name="surname" class="form-control" placeholder="Please enter your lastname *">
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label for="form_email">Email *</label>
                                    <input id="form_email" type="email" name="email" class="form-control" placeholder="Please enter your email *">
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label for="form_phone">Phone</label>
                                    <input id="form_phone" type="tel" name="phone" class="form-control" placeholder="Please enter your phone">
                                </div>
                            </div>
                        </div>

                        <div class="row">
                            <div class="col-md-4">
                                <div class="form-group">
                                    <label for="form_country">Country</label>
                                    <select class="form-control" id="form_country">
                                    </select>
                                </div>
                            </div>
                            <div class="col-md-4">
                                <div class="form-group">
                                    <label for="form_state">State</label>
                                    <select class="form-control" id="form_state">
                                    </select>
                                </div>
                            </div>
                            <div class="col-md-4">
                                <div class="form-group">
                                    <label for="form_city">City</label>
                                    <select class="form-control" id="form_city">
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-12">
                                <div class="form-group">
                                    <label for="form_address">Address *</label>
                                    <textarea id="form_address" name="address" class="form-control" rows="4"></textarea>
                                </div>
                            </div>
                            <div class="col-md-12">
                                <input type="button" class="btn btn-success btn-send" value="Submit">
                            </div>
                        </div>

                        <div class="row">
                            <div class="col-md-12">
                                <p class="text-muted"><strong>*</strong> These fields are required.</p>
                            </div>
                        </div>
                    </div>

                </div>

            </div>
            <!-- /.8 -->

        </div>
        <!-- /.row-->

    </div>
    <!-- /.container-->

    <script src="../CustomCode/referenceFiles/jquery.min.js"></script>
    <script src="../CustomCode/referenceFiles/bootstrap.min.js"></script>
    <script src="../CustomCode/js/CustomJS.js"></script>
    <!--<script src="validator.js"></script>
 <script src="contact.js"></script>-->
</body>

</html>

This will look like

Multi Level Cascading Dropdown
SharePoint Bootstap form

When user selects Country, it will populate only those states which belongs to selected countris, when user select perticular state, it will populate only those cities which belongs to selected state.

here is the REST javascript file for Multi Level Cascading Dropdown:

$(document).ready(function() {
    appendCountries();
    $('#form_country').change(function() {
        appendStates();
    });
    $('#form_state').change(function() {
        appendCity();
    });
    $('.btn').click(function() {
        AddListItem();
    });
});

function appendCountries() {
    $.ajax({
        url: "../_vti_bin/ListData.svc/CountryStateCity()?$orderby= Title asc&$select=Title",
        type: "get",
        headers: {
            "Accept": "application/json;odata=verbose"
        },
        success: function(data) {
            var values = [];
            var uniqueValues = [];
            var option = "";
            var valuesArray = data.d.results;
            $.each(valuesArray, function(i, result) {
                values.push(result.Title);
            });
            $.each(values, function(i, el) {
                if ($.inArray(el, uniqueValues) === -1) {
                    uniqueValues.push(el);
                    option += "<option value='" + el + "'>" + el + "</option>";
                }
            });
            $("#form_country").append(option);
        },
        error: function(data) {
            alert(data.responseJSON.error);
        }
    });
}

function appendStates() {
    var country = $('#form_country').val();
    $.ajax({
        url: "../_vti_bin/ListData.svc/CountryStateCity()?$select=State&$filter=Title eq '" + country + "'&$expand=State&$orderby= State/Title asc",
        type: "get",
        headers: {
            "Accept": "application/json;odata=verbose"
        },
        success: function(data) {
            var values = [];
            var uniqueValues = [];
            var option = "";
            var valuesArray = data.d.results;
            $.each(valuesArray, function(i, result) {
                values.push(result.State.Title);
            });
            $.each(values, function(i, el) {
                if ($.inArray(el, uniqueValues) === -1) {
                    uniqueValues.push(el);
                    option += "<option value='" + el + "'>" + el + "</option>";
                }
            });
            $("#form_state").empty();
            $("#form_state").append(option);
        },
        error: function(data) {
            alert(data.responseJSON.error);
        }
    });
}

function appendCity() {
    var state = $('#form_state').val();
    $.ajax({
        url: "../_vti_bin/ListData.svc/CountryStateCity()?$select=City&$filter=State/Title eq '" + state + "'&$expand=State,City&$orderby= City/Title asc",
        type: "get",
        headers: {
            "Accept": "application/json;odata=verbose"
        },
        success: function(data) {
            var values = [];
            var uniqueValues = [];
            var option = "";
            var valuesArray = data.d.results;
            $.each(valuesArray, function(i, result) {
                values.push(result.City.Title);
            });
            $.each(values, function(i, el) {
                if ($.inArray(el, uniqueValues) === -1) {
                    uniqueValues.push(el);
                    option += "<option value='" + el + "'>" + el + "</option>";
                }
            });
            $("#form_city").empty();
            $("#form_city").append(option);
        },
        error: function(data) {
            alert(data.responseJSON.error);
        }
    });
}

function AddListItem()
{
    var firstName = $("#form_name").val();
    var lastName = $("#form_lastname").val();
    var email = $("#form_email");
    var phone = $('#form_phone');
    var country = $('#form_country');
    var state = $('#form_state');
    var city = $('#form_city');
    var address = $('#form_address');
    $.ajax({
        url: _spPageContextInfo.webAbsoluteUrl + "../_vti_bin/ListData.svc/EmployeeDetails()",
        type: "POST",
        data: JSON.stringify({
            __metadata:
            {
                type: "SP.Data.TestListItem"
            },
            FirstName: firstName,
            Lastname: lastName,
            Email: email,
            Phone: phone,
            Country: country,
            State: state,
            City: city,
            Address: address
        }),
        headers:
        {
            "Accept": "application/json;odata=verbose",
            "Content-Type": "application/json;odata=verbose",
            "X-RequestDigest": $("#__REQUESTDIGEST").val(),
            "X-HTTP-Method": "POST"
        },
        success: function(data, status, xhr)
        {
            alert('Request has been submitted successfully');
        },
        error: function(xhr, status, error)
        {
            //console.log(data.responseJSON.error);
            alert('Error');
        }
    });
}

You can download full code here: Download or use mediafire link or user Google Drive link.

I hope you liked this article. If you have any queries, feel free to ask in the comment section below. Like our facebook page and subscribe to our newsletter for future updates. Have a nice day!

Convert SharePoint Date to Readable date format using jquery

Hi friends, today we are going to see how can we convert SharePoint date into human radable date format using jquery.

When you use REST api or JSOM to retrieve the date from sharepoint date field you will get the output like /Date(1508371200000)/

We can easily convert above date format into human readable format using below script. Here

var rawDate = "/Date(1508371200000)/"; 
var rawDate = parseInt(rawDate.substring(6, 19)); 
var d = new Date(rawDate); 
var result = d.format("dd MMM yyyy");

In the above code variable result will give you the output as 19 Oct 2017

Convert SharePoint date to Readable date
Convert SharePoint date to Readable date

I hope you liked this article. Please feel free to ask your queries in comment section below. Like our facebook page ans subscribe to our newslette for future updates. Have a nice day!

How to Display SharePoint List in jQuery Datatables

Hello friends, in this article we are going to retrieve data from SharePoint List using REST API and will display that data into jQuery Datatable. So let’s begin…

Show SharePoint List in Datatable format

Step 1:

We have a SharePoint list named EmployeeDetails as shown below with some dummy data. This list has 4 columns (Title, Name, Salary, Address).

EmployeeDetails List
EmployeeDetails List

Step 2 : Create a site page where we are going to show above data in datatable. For creating a page go to Site contents > Site pages > Click on new page icon. In this case I have created a page with name Employee Details.

Step 3 : Insert a Content Editor Webpart into a page.

Employee Details Page
Employee Details Page

Step 4 : Edit the Content Editor Webpart and paste the below code into it.

 

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/1.10.9/js/jquery.dataTables.min.js"></script>
<link href="https://cdn.datatables.net/1.10.9/css/jquery.dataTables.min.css" rel="Stylesheet" type="text/css" />
<script type="text/javascript" src="../SiteAssets/EmployeeJqueryDatatable.js"></script>
<div id="DatatablePanel">
    <table style="width: 100%;">
        <tr>
            <td>
                <div id="DatatableGrid" style="width: 100%"></div>
            </td>
        </tr>
    </table>
</div>

download above html file here. (or you can use MediaFire link)

Step 5 : If you can observe the above code, we have referenced a .js file named EmployeeJqueryDatatable.js So we have to first create this js file and upload it into Site assets. Please copy the below code into this js file and named it as EmployeeJqueryDatatable.js

$(document).ready(function() {
    var RestUrl = "../_vti_bin/listdata.svc/EmployeeDetails";
    $.ajax({
        url: RestUrl,
        method: "GET",
        headers: {
            "accept": "application/json;odata=verbose",
        },
        success: function(data) {
            if (data.d.results.length > 0) {
                //construct HTML Table from the JSON Data
                $('#DatatableGrid').append(GenerateTableFromJson(data.d.results));
                //Bind the HTML data with Jquery DataTable
                var oTable = $('#EmployeeTable').dataTable({
                    "iDisplayLength": 5,
                    "aLengthMenu": [
                        [5, 10, 30, 50],
                        [5, 10, 30, 50]
                    ],
                    "sPaginationType": "full_numbers"
                });
            } else {
                $('#DatatableGrid').append("<span>No Employee Details Found.</span>");
            }
        },
        error: function(data) {
            $('#DatatableGrid').append("<span>Error Retreiving Employee Details. Error : " + JSON.stringify(data) + "</span>");
        }
    });

    function GenerateTableFromJson(objArray) {
        var tableContent = '<table id="EmployeeTable" style="width:100%"><thead><tr><td>Title</td>' + '<td>Name</td>' + '<td>Salary</td>' + '<td>Address</td>' + '</tr></thead><tbody>';
        for (var i = 0; i < objArray.length; i++) {
            tableContent += '<tr>';
            tableContent += '<td>' + objArray[i].Title + '</td>';
            tableContent += '<td>' + objArray[i].Name + '</td>';
            tableContent += '<td>' + objArray[i].Salary + '</td>';
            tableContent += '<td>' + objArray[i].Address + '</td>';
            tableContent += '</tr>';
        }
        return tableContent;
    }
});

download above .js file here (for security reasons I have used .txt file here, so after downloading rename it to .js) or you can use MediaFire link to download the direct js file here

Step 6 : Once you upload the above js file into your site assets, go to our EmployeeDetails page that we ceated in step no. 2. Here we go!!! below is the output for our EmployeeDetails list

Video tutorial:

I have also created a step by step video tutorial for SharePoint Datatables. Please watch it for clear understanding:

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

I would like to reply to your queries. Please let me know whether you liked this simple step by step article on SharePoint Datatable integration. I am waiting for your comments! Please like our facebook page and subscibe to our newsletter for future updates. Have a nice day!

Cascading drop-downs using Lookup fields in SharePoint using SPServices

Hi friends, in this tutorial we are going to implement cascading of lookup fields in SharePoint using SPServices:

Lets take a simple example of Country > State cascading.

We have one Country List in which we are storing our Country values in Title field.

Country List
Country List

We have another list named States, in which we are storing state values in Title field. This list also has a lookup field named Country in which we are storing corresponding countries from Country List.

States List
States List with Country as Lookup field

Now we have third list named Information in which there are two lookup fields: Country and State

Information List with Country and State as lookup fields
Information List with Country and State as lookup fields

Just add below script in Content editor webpart on NewItem and EditItem page.

<script src="//code.jquery.com/jquery-1.10.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.SPServices/2014.02/jquery.SPServices.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
    $().SPServices.SPCascadeDropdowns({
        relationshipList: "States",
        relationshipListParentColumn: "Country",
        relationshipListChildColumn: "Title",
        parentColumn: "Country",
        childColumn: "State",
        debug: true
    })
})
</script>

If you want three level of cascading like Country > State > City, you can modify the code as below:

<script src="//code.jquery.com/jquery-1.10.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.SPServices/2014.02/jquery.SPServices.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
    $().SPServices.SPCascadeDropdowns({
        relationshipList: "States",
        relationshipListParentColumn: "Country",
        relationshipListChildColumn: "Title",
        parentColumn: "Country",
        childColumn: "State",
        debug: true
    })
    $().SPServices.SPCascadeDropdowns({
        relationshipList: "City", // This will be a name of City List
        relationshipListParentColumn: "States", // This will be a name of State list
        relationshipListChildColumn: "Title",
        parentColumn: "State",
        childColumn: "City",
        debug: true
    })
})
</script>

Watch below YouTube video created by me, which will explain the process in details:

If you liked this article, please share your comments below. Let me know if you face any issues. Like our facebook page for future updates. Have a nice day!

The selected user(s) may not be valid on the site this workflow is published on

Hi friends, in this SharePoint 2013 tutorial we are going to solve an issue of email error. While developing SharePoint workflow in SharePoint designer 2013, we need to send an email notification to the user. Sometimes a user may not be valid SharePoint user. These users are called external users. When you try to add Email ID of such users, we usually get the following error.

“The selected user(s) may not be valid on the site this workflow is published on. If a recipient is not a valid SharePoint user, he or she will not receive workflow emails.”

not-a-valid-sharepoint-user-email-error

There are two methods to fix this problem. We can pass the email address through one string variable and another method is to call the SharePoint 2010 workflow. We will see both of these methods one by one.

Method 1: Using String Variable

Instead of adding email address directly in email setup, save it in one string variable. Here we have created one string variable named TestEmail.

create string variable

Now add this string variable in the email setup as shown below. Make sure that you are using Return field as Login name.

send email via variable

sharepoint email

Now click on OK and that’s it! Now SharePoint will not show any error message and it will also send an email notification to the user.

Let us see another approach for solving this issue.

Method 2: By Calling SharePoint 2010 workflow

Create a separate SharePoint 2010 workflow on the same list so that you can utilize the fields for that list. SharePoint 2010 doesn’t validate the user and you can use external users in it. Now create an action for sending email in 2010 workflow in the same way.

Once created, we can call this 2010 workflow through 2013 workflow using the following action.

call sharepoint 2010 workflow

In this way, we can send an email to external users using SharePoint 2013 workflow. I hope you liked this article, please share it with your friends. Like our facebook page and subscribe to our newsletter for future updates. Have a nice day!

Load Different JavaScript for Different Browsers

Hi friends, in this article we are going to learn how we can load different JavaScript for different browsers. A few days ago I was trying to implement back button in one of my HTML pages. The page on which I was trying to implement Back button was loading from one of the auto-redirected pages.

So this back button was working on Chrome browser but not on Internet Explorer. Chrome is enough intelligent browser and it can detect that the page is from one redirected page. So when we click on the back button it will land you to 2 pages back. But Internet Explorer cant has this intelligence.

When I was trying to click on the Back button in Internet Explorer, it was loading the previous page. As the previous page was having auto-redirect code so it again goes to the same page which was having Back button. So using Back button in Internet Explorer was producing a never-ending loop. So I thought to implement one trick which will load 2 page back button in IE. This can be implemented by loading Browser specific JavaScript. Using this method we can load different JavaScript for different browsers.

Browser Specific JavaScript

Here we are using Back button which will call goBack() onclick event.

 <input type="button" onclick="goBack()" value="BACK" />  

We all know that we use window.history.go(-1); for loading previous page. But we need window.history.go(-2); to load in Internet Explorer. We can use the following code which will load these actions depending on which browsers you are using.

 <script>  
      function goBack() {  
       // Internet Explorer 6-11  
       var isIE = /*@[email protected]*/false || !!document.documentMode;  
       if(isIE)  
       {  
         window.history.go(-2);  
       }  
       else  
       {  
         window.history.go(-1);  
       }  
      }  
 </script>  

This script can be used to load window.history.go(-2); for IE browser and window.history.go(-1); for browsers other than IE.

If you like this article, please share it with your friends and like our facebook page for future updates. Subscribe to our newsletter to get notifications about our updates via email. If you have any queries, feel free to ask in the comments section below. Have a nice day!

Customize Workflow Task Form to Add Extra Button

Hi friends, in this post, we will see how to customize the default SharePoint Workflow Task list in SharePoint 2013. In general, there are only two options for SharePoint workflow task, which are Approved and Rejected. If we want some more extra buttons then we have to customize workflow task form. We can easily add the new button by adding more options in Task Outcome column.

This is helpful when you need to route your SharePoint workflow based on action more than just Approve or Reject. Just follow the below steps to customize workflow task form. These steps are for SharePoint 2013 version but same can be followed for SharePoint 2010.

Add Custom Button in SharePoint Workflow Task List

  1. Open Workflow Task List
  2. Go to List Settings
  3. Click on Create column
  4. Create a column of type Task Outcome (if you don’t have already)Add New button in Workflow Task
  5. Enter options which you want as Task outcome
  6. Click on OK to save the column

Now you can see three buttons for your task, Approved, Rejected and Need more info. Here we have added an extra button named Need More Info. See below a screenshot of the customized workflow task.

Customize Workflow Task List

You can add as many options as you want. So this is all about how to customize workflow task in SharePoint 2013. I hope you liked this article. Feel free to ask your doubts in the comment section below. Like our facebook page and subscribe to our newsletter for future updates.

How to Add New Item Button in Web Part in SharePoint 2013

Hi friends, in this short SharePoint 2013 tutorial we are going to learn how to create “Add New Item” button and add it in a web part. Actually its very easy to get a link of new item page and using basic HTML code we can add a link of new item anywhere. But if you want an exact same New Item button to add in a web part you can follow this tutorial.

In this example, we are going to Add a New Item button of Employee Details List to a Home Page of Main Site.

Add New Item Button in a Web Part

  1. Open a list in a Chrome web browser
  2. Open Chrome DevTools (Shortcut: F12) or Right-click anywhere and Select Inspect Element.
  3. Click on Cursor symbol representing select an element to Inspect it.Chrome DevTools
  4. Now move your cursor on New Item button
  5. Copy the Element HTML codeCopy Add New Item Link
  6. Add a Content Editor Web Part to a page where you want to Add New Item Button
  7. Paste the New Item Button code into Web Part
  8. Click on Stop Editing, that’s it!

Note: When you add Web Part you may see the title of Web Part which is sometimes not needed. See Below screenshot.

Remove Content Editor title To Remove this text we have to change Web Part properties. So click on Edit Web Part and select Chrome type as None under Appearance.Edit Webpart

Click on OK to save the changes. See below screenshots.

Chrome Type None

Add New Item Button Link

If you like this article, please share it with your friends and like our facebook page for future updates. Subscribe to our newsletter to get notifications about our updates via email. If you have any queries, feel free to ask in the comments section below. Have a nice day!

All About Document Set in SharePoint 2013

Hi friends, In this article, we are going to discuss all about Document Set in SharePoint 2013. In general, we use Folders to upload and manage files. We can not use these normal folders to manage a single deliverable, or work product, that can include multiple document or files. In such cases, we can make use of Document Set.

What is Document Set in SharePoint 2013?

As discussed already, Document Set is a special feature available in SharePoint Server 2013 that enables the organization to manage work product which includes multiple documents. The document set is a content type that we can add to the library. It is a little bit different than a folder and having some additional features than a normal folder.

In short, we can say, the Document set is a collection of documents packed together.

What is the difference between the Document Library and Document Set?

You might be confused about the difference between Document Library and Document Set. We know that we can upload documents in a document library, but do you know we can upload Document Set in Document library and it has the same column as the Document library.

You can use Document set as a folder inside Document library. We can use some additional features of the Document set which we cannot use with a normal folder. In short, a Document library is a place where documents or document set can be stored.

How to enable and use the Document Set in SharePoint 2013?

Step 1: Activate Document Set feature

  1. Open your site in a web browser
  2. Click on Settings button (Gear icon) and go to Site Settings
  3. Under Site Collection Administration select Site collection features
  4. Click on Activate button corresponding to Document Set.Activate Document Set in Sharepoint 2013

Step 2: Enable Content Type

To enable the document set for a library we have to enable Document set content type. To enable Document set content type to follow these steps.

  1. Open a library where you want to enable Document set
  2. Choose the library settings
  3. Go to advanced settings
  4. Enable “Allow management of content type”
  5. Save changes and go back to Library settings
  6. From the content type section click on AddAdd Document Set Content Type
  7. Add the Document Set content type and then save the changesAdd Document Set Content Type 2

Step 3: Adding Documents to Document Set Content Type

  1. Open the Document Library and choose the Files Tab
  2. Select New Document Set Context typeDocument Set Context
  3. Enter the name of the Document SetDocument Set Name
  4. Now your Document Set is Ready for the use. You can add documents later too.Document Set in SharePoint 2013

Here you can see that multiple documents exist in the same document set. Also, the Document Library columns are also available for child documents as well.

If you like this article, please share it with your friends and like our facebook page for future updates. Subscribe to our newsletter to get notifications about our updates via email. If you have any queries, feel free to ask in the comments section below. Have a nice day!