WordPress Resources at SiteGround

WordPress is an award-winning web software, used by millions of webmasters worldwide for building their website or blog. SiteGround is proud to host this particular WordPress installation and provide users with multiple resources to facilitate the management of their WP websites:

Expert WordPress Hosting

SiteGround provides superior WordPress hosting focused on speed, security and customer service. We take care of WordPress sites security with unique server-level customizations, WP auto-updates, and daily backups. We make them faster by regularly upgrading our hardware, offering free CDN with Railgun and developing our SuperCacher that speeds sites up to 100 times! And last but not least, we provide real WordPress help 24/7! Learn more about SiteGround WordPress hosting

WordPress tutorial and knowledgebase articles

WordPress is considered an easy to work with software. Yet, if you are a beginner you might need some help, or you might be looking for tweaks that do not come naturally even to more advanced users. SiteGround WordPress tutorial includes installation and theme change instructions, management of WordPress plugins, manual upgrade and backup creation, and more. If you are looking for a more rare setup or modification, you may visit SiteGround Knowledgebase.

Free WordPress themes

SiteGround experts not only develop various solutions for WordPress sites, but also create unique designs that you could download for free. SiteGround WordPress themes are easy to customize for the particular use of the webmaster.

Content Types in SharePoint – Best Explained

Hello folks, in this article I will try to explain Content types in SharePoint in details. Most of the SharePoint beginners find it difficult to understand what exactly the content type is? and how we can use it in SharePoint? We will try to learn content types by comparing it with one day-to-day example. We will cover the advantages and use of content types during this course as well.

Day-to-day example (to understand content types)

The example that we are going to discuss is the Banking system. When we need to make some transactions like cash withdrawal, cash deposit, cheque encashment, etc. we use different formats of slips. Making use of different format slips for different purposes makes it easy for bank officers to differentiate the type of transaction.

Consider that the bank has one big box in which they keep all kind of slips together. By the end of the day, it will be easier for them to differentiate the different formats of slips and make the calculations. If they would have used the same slip format for all kind of transactions (deposit, withdrawal, etc) it would have become difficult for them to deal with them. It may cause the huge loss for the bank as well.

In this example, you can consider

  • Big box (in which the slips are collected) as your list or library
  • Different formats of slips as Content Type
  • Unique fields (like Name, Account number, Signature) in all formats of slips as Site columns

Thus, a content type is a reusable group of site columns which represents a set of information.

Content Types in SharePoint

You will hear the word Content type every day while working with SharePoint. It is very important to understand and utilize the same. According to Microsoft, A content type is a reusable collection of metadata (columns), workflow, behavior, and other settings for a category of items or documents in a SharePoint list or document library. Content types enable you to manage the settings for a category of information in a centralized, reusable way.

Content type provides one more advantage to you, whenever you make any changes in content type, it provides an option whether to apply the new changes to all the lists (which are using that particular content type) or not.

If you have worked on a Task list or Announcement list then you have already used a content type. SharePoint has many default content types. If you create a new Task list, you can see that there are some columns already available like Task name, start date, due date, etc. These columns are default site columns and the Task list is using default content type as Task as shown below.

How to create a content type in SharePoint?

Before creating a Content type you should make note of below important points

  1. It’s a best practice to create a Content type under the root site (top site) so that it can be used under all subsites as well. This is again based on the requirements of the organization because users don’t want to have too many content types under the root sites, which are not useful.
  2. If you create a Content type in a subsite, you cant use that Content type in your root site.
  3. When you update the Content type, it’s your wish whether to apply the updates on existing lists or not.
  4. If you want to delete the content type from the site collection, you need to remove that content type from all the associated list/libraries.

A) Create a content type for List

  1. Create a list named BankingSystem
  2. We will create 2 content types named Cash Deposit and Cash Withdrawal 
  3. Create 3 site columns named Customer Name, Account Number, Signature (You can read this article on creating site columns: SharePoint Site Columns)
  4. Go to Site Contents > Web Designer Galleries > Site content types
  5. Click on create
  6. Enter the information as shown below. It will ask you to choose a Parent Content type, you can choose anyone. In this case, I have chosen Item content type. Item content type by default has Title site column only. Finally, click on OK
  7. Now our content type is ready but before using it we have to first add site columns to it.
  8. To add site columns to this content type, go to Site SettingsWeb Designer Galleries > Site content types > Click on newly created a content type (Cash Deposit)
  9. Click on Add from existing site columns
    10. Add the site columns to this content type. Here is an important point need to be noted. Add all the required site columns for this content type. In the below screenshot I have added only 3 but you can add as many as you want to make it different from other content types.
  10. Similarly, add another content type and name it Cash Withdrawal with some different site columns.
  11. Now both the content types are ready for use. Let’s add these content types to a List named BankingSystem
  12. Go to List Settings > Advanced settings > make sure the Allow management of content type is selected as shown below:
  13. Click on Add from existing site content types
  14. Add both the custom content types as shown below
  15. You can see both these content types are available under the New Item option

B) Create a content type for Document Library

  1. Create a Document Library named BankingSystem
  2. We will create 2 content types named Cash Deposit and Cash Withdrawal 
  3. Create 3 site columns named Customer Name, Account Number, Signature (You can read this article on creating site columns: SharePoint Site Columns)
  4. Go to Site Contents > Web Designer Galleries > Site content types
  5. Then click on create.
  6. Enter the information as shown below. It will ask you to choose a Parent Content type, you can choose anything. In this case, I have chosen Document content type. Finally, click on OK
  7. Now our content type is ready but before using it we can add site columns to it or can change the document template from advanced settings as shown below
  8. To add site columns to this content type, go to Site SettingsWeb Designer Galleries > Site content types > Click on newly created a content type (Cash Deposit)
  9. Click on Add from existing site columns
  10. Add the site columns to this content type. Here is an important point need to be noted. Add all the required site columns for this content type. In the below screenshot I have added only 3 but you can add as many as you want to make it different from other content types.
  11. Similarly, add another content type and name it Cash Withdrawal with some different site columns.
  12. Now both the content types are ready for use. Let’s add these content types to a Library named BankingSystem
  13. Go to Library Settings > Advanced settings > make sure the Allow management of content type is selected as shown below:
  14. Click on Add from existing site content types

  15. Add both the custom content types as shown below
  16. You can see both these content types are available under the New Document option

I hope you liked reading this article. If you have any questions feel free to as in the comment section below.

SharePoint Site Columns – Best Explained

Hello friends, in my 3 years of journey with SharePoint, I have never used SharePoint site columns. SharePoint provides the lightning fast way for creating list columns, which makes us lazy to learn about site columns. In this article, I will try to explain about SharePoint site columns in details. This applies to all versions of SharePoint like SharePoint 2010, 2013 and SharePoint Online (Office 365).

It takes a few seconds to create list columns
It takes a few seconds to create list columns

SharePoint Site Columns

According to Microsoft, “A site column is a reusable column definition, or template, that you can assign to multiple lists across multiple SharePoint sites. Site columns are useful if your organization wants to establish some consistent settings across lists and libraries.”

Why should we use SharePoint Site Columns?

Scenario:

Assume that your organization has a SharePoint portal which has 20 different lists. Each list contains a choice column named a country with 3 options as India, America, and England. later point of time, if you want to add one more country as China in the option for all the lists, what will you do? The only way available for you is to add that new option in each list manually from list settings.

In such scenarios, Site columns play an important role. Site columns allow you to share the changes/settings across multiple lists so that you don’t have to configure the settings each time. Site columns provide one more advantage to you, whenever you make any changes in site columns, it provides an option whether to apply the new changes to all the lists (which are using that particular site column) or not.

When you update the site column, it will ask whether to apply the changes on all lists which are using the particular site column
When you update the site column, it will ask whether to apply the changes on all lists which are using the particular site column.

How to Create a Site Column in SharePoint?

Before creating a Site Column you should make note of below important points

  1. It’s a best practice to create a Site Column under the root site (top site) so that it can be used under all subsites as well. This is again based on the requirements of the organization because users don’t want to have too many site columns under the root sites, which are not useful.
  2. If you create a Site Column in a subsite, you cant use that site column in your root site.
  3. When you update the site column, it’s your wish whether to apply the updates on existing lists or not (this point is already explained above).
  4. If you delete the site column, it won’t be deleted automatically from all the lists. You have to delete the site columns specifically from all the lists.

let’s see how to create a SharePoint site column:

  1. Go to Site Settings
  2. Click on Site columns under Web Designer Galleries
  3. Click on Create

  4. In the Name and Type section, type the name that you want in the Column name box. In this case we are creating a site column named Country.
  5. Choose the appropriate the column type like Singe line of text, Lookup, etc. In this case, Choice (India, America, and England)
  6. In the Group section, add this new Site column under existing groups or create a new one. Categorizing columns into groups will make it easier for users to find them in the future. In this case, we are adding this site column to a group named Custom Columns.
  7. Click on OK.

This way we are ready with the new site column, which can be used in all lists under the specified sites or subsites.

How to add site columns to existing SharePoint List or Library

Let’s add the newly created site column to the existing list. We have a list named EmployeeDetails where we are going to add a Site Column named Country which was added in Custom Columns group.

  1. Go to list settings
  2. Click on add from existing site columns

  3. Choose group so that it will be easy to find the custom site column. Then choose the site column name and click on Add
  4. Click on OK and we are ready to use this site column in our list.

How to update/delete site columns in SharePoint?

  1. Go to Site Settings
  2. Click on Site columns under Web Designer Galleries
  3. Click on Site Column name
  4. Update the site column and click OK or if you want to delete the column, click on Delete button.

I hope you liked this article. If you have any queries, please use below comments section for the same. Please like our facebook page and subscribe to our newsletter for future updates. Have a nice day! ta da…

CRUD Operations using REST API in SharePoint Online/2013/2010

  1. Hello folks, in this tutorial we are going to perform CRUD (Create, Read, Update and Delete) operations using REST API in SharePoint.

Learn how to perform CRUD (Create, Read, Update and Delete) operations using REST API in SharePoint List. You can use it for SharePoint Online, 2010, 2013 and 2016.
.

Create SharePoint list Item using REST API Read SharePoint list Item using REST API Update SharePoint list Item using REST API Delete SharePoint list Item using REST API

Setup required

We are using a SharePoint custom list named “EmployeeDetails” with below columns:

Column Name Type
EmloyeeName (internal name is Title) Single line of text
Address Multiple lines of text
Country Choice (India, US, UK)
Age Number
Salary Currency
DateOfBirth Date and Time
IsEmployeeMarried Checkbox
ManagerName Person or group
ProfileUrl Hyperlink

Download: You can download the template of this SharePoint list here.

Create Item:

//Create a SharePoint List Item using REST Api

function createItem() {
    $.ajax({
        url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getByTitle('EmployeeDetails')/Items",
        type: 'POST',
        headers: {
            "Accept": "application/json;odata=verbose",
            "Content-Type": "application/json;odata=verbose",
            "X-RequestDigest": $("#__REQUESTDIGEST").val(),
            "X-HTTP-Method": "POST"
        },
        data: JSON.stringify({
            __metadata: {
                type: "SP.Data.EmployeeDetailsListItem"
            },
            Title: "Mayuresh Dinkar Joshi",
            Address: "ABC Center, Near Sdftji Dfrtg 123123 Test",
            Country: 'India',
            Age: 25,
            Salary: 1000,
            DateOfBirth: "1993-09-21T07:00:00Z",
            IsEmployeeMarried: true,
            ManagerNameId: 16, //internalName is 'ManagerName' but we have to use 'ManagerNameId' to pass id of a person
            ProfileUrl: {
                __metadata: {
                    "type": "SP.FieldUrlValue"
                },
                Url: "http://test.com",
                Description: "Url Description"
            },
        }),
        success: function(data) {
            alert('Item created successfully!');
        },
        error: function(error) {
            alert(JSON.stringify(error));
        }
    });
}

Read Item:

//Read a SharePoint List Item using REST Api

function readItem() {
    $.ajax({
        url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getByTitle('EmployeeDetails')/Items(1)",
        type: 'GET',
        headers: {
            "accept": "application/json;odata=verbose",
        },
        success: function(data) {
            console.log(data.d);
            alert(" First name: " + data.d.Title +
                "\n Address: " + data.d.Address +
                "\n Country: " + data.d.Country +
                "\n Age: " + data.d.Age +
                "\n Salary: " + data.d.Salary +
                "\n DateOfBirth: " + data.d.DateOfBirth +
                "\n IsEmployeeMarried: " + data.d.IsEmployeeMarried +
                "\n ManagerName: " + data.d.ManagerNameId +
                "\n ProfileUrl: " + data.d.ProfileUrl.Url);
        },
        error: function(error) {
            alert(JSON.stringify(error));
        }
    });
}

Update Item

//Update a SharePoint List Item using REST Api

function updateItem() {
    $.ajax({
        url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getByTitle('EmployeeDetails')/Items(1)",
        type: "PATCH",
        headers: {
            "Accept": "application/json;odata=verbose",
            "Content-Type": "application/json;odata=verbose",
            "X-RequestDigest": $("#__REQUESTDIGEST").val(),
            "IF-MATCH": "*",
            "X-HTTP-Method": "MERGE"
        },
        data: JSON.stringify({
            __metadata: {
                type: "SP.Data.EmployeeDetailsListItem"
            },
            Title: "updated Mayuresh Dinkar Joshi",
            Address: "updated ABC Center, Near Sdftji Dfrtg 123123 Test",
            Country: 'US',
            Age: 26,
            Salary: 2000,
            DateOfBirth: "1993-09-22T07:00:00Z",
            IsEmployeeMarried: false,
            ManagerNameId: 16, //internalName is 'ManagerName' but we have to use 'ManagerNameId' to pass id of a person
            ProfileUrl: {
                __metadata: {
                    "type": "SP.FieldUrlValue"
                },
                Url: "http://test1.com",
                Description: "updated Url Description"
            },
        }),
        success: function(data) {
            alert('Item updated successfully!');
        },
        error: function(error) {
            alert(JSON.stringify(error));
        }
    })
}

Delete Item

//Delete a SharePoint List Item using REST Api

function deleteItem() {
    $.ajax({
        url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getByTitle('EmployeeDetails')/Items(1)",
        type: 'DELETE',
        headers: {
            "X-RequestDigest": $("#__REQUESTDIGEST").val(),
            "IF-MATCH": "*",
            "X-HTTP-Method": "DELETE"
        },
        success: function(data) {
            alert('Item deleted');
        },
        error: function(error) {
            alert(JSON.stringify(error));
        }
    })
}

 

 

Sharepoint online practice test for beginners

Sharepoint online practice test – 1

 

The objective of this SharePoint online test is to evaluate the basic knowledge of SharePoint for beginners. In this quiz, there are 10 Simple questions for SharePoint online. There is no time limitation for this quiz with unlimited attempts.

[wp_quiz id=”1681″]

Tags: online test, practice test, online practice, online practice test, SharePoint online, online test online, test online, SharePoint online test, SharePoint practice exams

Meta keywords: Sharepoint online test, online test, Sharepoint, test, quiz, Sharepoint MCQs, Sharepoint Multiple Choice Questions, beginners.

Latest 67 AngularJS Interview Questions for 2018

Looking for AngularJS interview questions for experienced or freshers? Here are the latest AngularJS Interview Questions for 2018. AngularJS is the high demanding programming language across the globe. If you are lined up with the AngularJS interview, don’t worry, just follow these top AngularJS interview questions which will help you to increase your possibility of the selection.

AngularJS Interview Questions

AngularJS Interview Questions
AngularJS Interview Questions
  1. What is AngularJS?
  2. Why do we call AngularJS as client-side technology?
  3. Why do we call AngularJS as JavaScript framework?
  4. Types of web request?
  5. What is the first request?
  6. What is a post-back request?
  7. How many maximum and minimum post-back requests a webpage can have?
  8. What is the multipage application?
  9. What are limitations of multipage application?
  10. How to overcome the limitations of multipage application?
  11. What is single page application?
  12. What is full page postback?
  13. What is partial page postback?
  14. What is design pattern?
  15. What is MVC?
  16. What is the role of Model?
  17. What is the role of View?
  18. What is the role of Controller?
  19. How can we implement AngularJS in MVC?
  20. List out AngularJS versions
  21. how to download AngularJS software
  22. how to import AngularJS library into our webpage
  23. what is AngularJS directives? list out.
  24. What is ng-app?
  25. What is ng-model?
  26. What is ng-bind?
  27. What is ng-init?
  28. What is AngularJS expression?
  29. What are AngularJS objects?
  30. What is the syntax of declaring objects?
  31. What is the syntax to declare AngularJS variables?
  32. What is the syntax to declare AngularJS Arrays?
  33. How to process colections in view? Syntax?
  34. How to get the index value of the array element by using AngularJS expression?
  35. What are AngularJS modules?
  36. How to create AngularJS module?
  37. Syntax to create AngularJS module?
  38. How to bind AngularJS module to HTML view?
  39. What are AngularJS controllers?
  40. How to create angular js controller?
  41. Syntax to create angular js controller?
  42. How to bing AngularJS controller to HTML view?
  43. What are the avaialbe filters in AngularJS?
  44. How to apply the filter?
  45. Syntax to apply a filter?
  46. List out AngularJS events.
  47. syntax to define AngularJS function
  48. what is $scope?
  49. What is $event?
  50. What are the directives for fields to perform validations?
  51. What are the pre-defined states of fields?
  52. What are the pre-defined states of form?
  53. What are the rules to implement validations in AngularJS?
  54. What is the use of ‘required’ state?
  55. What is the use of ‘$error’?
  56. Syntax to display an error message?
  57. What is the fixed expression for uppercase?
  58. What is the fixed expression fo lowercase?
  59. What is the AngularJS pattern for one uppercase, one lowercase, and one special character or number?
  60. How to confirm whether the fixed expression is matched or not?
  61. What is service?
  62. What are the pre-defined services in AngularJS?
  63. What are the advantages of services in AngularJS?
  64. How to create a service in AngularJS?
  65. Syntax to create an AngularJS service with service() method?
  66. Syntax to access the service in a controller?
  67. Write the implementation of AngularJS service in step by step.

I hope you are prepared with the answers for these top AngularJS interview questions. If you like this article, please like our facebook page and subscribe to our newsletter for future updates! Let us know your thoughts and suggestions in comment section below.

Tags: Top AngularJS Interview Questions You Must Prepare For 2018. Top 50 AngularJS Interview Questions And Answers.

Multichannel and Multidimensional Signals with easy Explaination

Hello friends, in this quick article we are going to learn about Multichannel and Multidimensional Signals with there definitions and day-to-day example.

Multichannel and Multidimensional Signals

Multichannel and Multidimensional Signals
Multichannel and Multidimensional Signals

Multichannel Signals

  • As the name indicates, multichannel signals are generated by multiple sources or multiple sensors.
  • The resultant signal is the vector sum of signals from all channels

Example: A common example of a multichannel signal is ECG waveform. To generate ECG waveform; different leads are connected to the body of a patient. Each lead is acting as an individual channel. Since there are n number of leads; the final ECG waveform is a result of the multichannel signal. mathematically final wave is expressed as,

Multidimensional Signals

If a signal is a function of a single independent variable, the signal is called a one-dimensional signal. On the other hand, if the signal is a function of multiple independent variables then it is called as a multidimensional signal.

A good example of a multidimensional signal is the picture displayed on the TV screen. To locate a pixel on the screen, two coordinates namely x and y are required. Similarly, this point is a function of time also. So to display a pixel, minimum three dimensions are required; namely x, y, and t. Thus this is a multidimensional signal. Mathematically it can be written as P(x, y, t).

I hope you liked this article on Multichannel and Multidimensional Signals. Do let us know in case you are having any questions in the comment section below. Like our facebook page and subscribe to our newsletter for future updates. have a great time 🙂

Deterministic and Random Signals

Hi friends, in this article we will learn some basic concepts about Deterministic and Random Signals

Deterministic signal

A signal which can be described by a mathematical expression, lookup table or some well-defined rule is called as the deterministic signal.

Examples: Sine wave, cosine wave, square wave, etc.

Deterministic signal
Deterministic signal

Sine wave can be represented mathematically as,

x(t) = A sin (2πft)

where A is the amplitude of a signal

f = frequency of a signal

Note: The deterministic signals such as sine wave, cosine wave, etc are periodic. But some deterministic signals may not be periodic. The exponential signal is an example of a non-periodic signal.

Random Signal

A signal which cannot be described by any mathematical expression is called as a random signal. Due to this, it is not possible to predict about the amplitude of such signals at a given instant of time.

Example: A good example of a random signal is noise in the communication signal. Below figure shows one of the random signals.

Energy and Power Signal

Hi friends, in this tutorial we are going to learn about Energy and Power signal in Signals and Systems.

Energy and Power Signal

A) Power Signals

There are three power signals:

  1. Instantaneous power
  2. normalized power
  3. Average normalized power

Let’s see each type one by one.

Instantaneous power

An instantaneous power across resistor R is given by

Here V is the voltage across the resistor R. Let us consider that this voltage is represented by x(t) then above equation becomes

Similarly, in terms of current, we can write,

If we say current is denoted by x(t), then we can get

Normalized power

Every time we don’t know if x(t) is a current signal or voltage signal. therefore to make power equation independent of nature of x(t), we will normalize it by putting R = 1, thus the equation 2) and 4) becomes

Average normalized power

average normalized power is given by,

  • Here magnitude of x(t) is written so this equation is also applicable if x(t) is complex
  • Integration is taken from -T0/2 to T0/2 that is it means, it is from entire time period T0
  • Considering T0 as average value, integration term is multiplied by 1/T0

Based on all the above equations we can define power signal as below

Definition of Power Signal

A signal x(t) is said to be power signal is its normalized average power is non-zero and finite. thus for the power signals the normalized average power, P is finite and non-zero.

For the discrete time signals, average power P is given by,

In above equation, it is expected that N>>1

B) Energy Signal

The total normalized energy for a real signal x(t) is given by

but if the signal x(t) is complex then we can write above equation as

Definition of energy signal

A signal x(t) is said to be an energy signal if its normalized energy is non-zero and finite. Hence for the energy signals, the total normalized energy (E) is non-zero and finite.

The energy of discrete time signal is denoted by E, it is given by,

You can remember the conditions for Energy and Power signal using below table.

Power of the energy signals

Let us consider, x(t) is an energy signal. i.e. x(t) has a finite non-zero energy. let us calculate the power of x(t). By definition, explained in equation no. 6) the power of x(t) is given by

Therefore we can say that the power of energy signal is zero over a finite time.

Energy of a power signal

Let us consider, x(t) be a power signal. The normalized energy of this signal is given by,

This equation can be written as,

Therefore we can say that energy of a power signal is infinite over a finite time.

Comparison of Energy and Power Signals

Power Signals Energy Signals
1. The signal having finite non-zero power are called as Power Signals 1. The signals having finite non-zero energy are called as energy signals
2. Almost all the periodic signals in practice are power signals 2. Almost all the nonperiodic signals are energy signals
3. ower signals can exist over an infinite time. They are not time-limited 3. Energy signals exist over a short period of time. They are time limited
4. The energy of a power signal is infinite 4. Power of an energy signal is zero

I hope you liked this article on Energy and Power Signal. Please like our facebook page and subscribe to our newsletter for future updates. If you have any questions, feel free to ask in the comment section below. Have a great time 🙂

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 jQuery code. We can read an excel file which is hosted on any server, SharePoint folder, etc with the help of jQuery code. Here you can get readymade jQuery 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! 🙂