How to Read Excel Data and Save it in MS Dynamic CRM Entity (Table)

To Achieve this, Firstly you have to Read the Excel Data and then Save it in Fields of Entity.

1) Read Excel data Using Angular js.

Step 1: Download the angular.min.js lib from Here.

Step 2: Create an Html file and Copy paste the following code from Here.

// This is the code to read the Excel data
<html>
 <head>
     // Add lib in the code
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script type="text/javascript" src="angular.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.11.5/xlsx.full.min.js"></script>
     <script src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.11.5/jszip.js"></script>

     <script type="text/javascript">    
   var app = angular.module('myApp', []);
   app.controller("myCtrl", ["$scope",function($scope){
 
$scope.selectedFile = null;
$scope.msg = "";

$scope.loadFile = function (files) { 
$scope.$apply(function () { 
$scope.selectedFile = files[0]; 
}) 
}

$scope.handleFile = function () {

var file = $scope.selectedFile;
if (file) {
var reader = new FileReader();
reader.onload = function (e) {
var data = e.target.result;
var workbook = XLSX.read(data, { type: 'binary' });
var first_sheet_name = workbook.SheetNames[0];
var dataObjects = XLSX.utils.sheet_to_json(workbook.Sheets[first_sheet_name]);
// Now your Excel data is in dataobjects.
if (dataObjects.length > 0) { 
$scope.save(dataObjects);   // call save function to save the data.
} else {
$scope.msg = "Error : Something Wrong !";
}
}
reader.onerror = function (ex) {
}
reader.readAsBinaryString(file);
}
}

$scope.save = function (data) { 
                  // to save the data in Dynamic CRM, Write code Here.........
                // We can save the data using Web Api 
   alert("this is save function");

  }]);
 
   </script>

<meta></head>

<body style="word-wrap: break-word;">

<div ng-app="myApp" ng-controller="myCtrl">
  <input type="file" name="file" onchange="angular.element(this).scope().loadFile(this.files)">
        <br><br>
            <input type="button" value="Import Data" ng-click="handleFile()">
        <br>
        <p ng-bind="msg"></p>
</div>

</body></html>


Step 3: After save this file, Run this file in Browser and then you will see there is a dataObjects variable which store all Excel Data. After store the data in variable it will call the Save Function to save the Data.

Step 4: Create a new Web Resource in Dynamic CRM. Upload this HTML file in this Web Resource.
Now apply this web Resource on Entity form.

Cool..... Its working....
NOTE:  Apply debugger in Save function and then check Data variable contain all Excel Data.

Important Point: Column Name must be in Single Word like Column_1, Column_2 etc.

How to apply Logo In ADX Retail Portal

Apply Logo in Retail Portal.

There are Two Places where we can apply the logo of company for which we are creating this Portal.

  I would like to apply the logo at 2nd place as show in above image.

Step 1: Hover on it as show in below image and click on Edit.

Step 2: Click on the Icon as show in below image and then click on the BROWSE SERVER.


Step 3: To apply Logo, you have to upload image on this server. Right click on the screen and then click on UPLOAD FILES to upload Logo image on it.

Step 4: After upload images on it, close this window. Now click on this icon to see the code.


NOTE: Change the code as need basis. After Change the code click ok and then save the code. Now reload the Portal to see the changes.



Click Here to know, How to change slider's image in ADX Retail Portal.

Click Here to know, How to add a new product category in product catalog of ADX Retail Portal.

How to change the Slider's Image in ADX Retail Portal

Steps to change slider's Image :

To customize the portal, you have to sign in by a Administrator.

Username : administrator
Password :  pass@word1

Step 1: Hover on the slider, then click on the EDIT as show in Below ScreenShot.

Step 2: Now Click on the Icon as show in Below ScreenShot and then click on the BROWSE SERVER. It will open a new Screen where all slider's Image are placed.


Step 3: To apply the image in slider, Firstly you have to upload image on this server. Right click on the screen which opened in last step and then click on UPLOAD FILES to upload image on it.

Step 4: After upload images on it, close this window. Now click on this icon(show in below Screenshot) to see the code of slider.
NOTE: If you have some good Knowledge of HTML then you can easily change the Slider's Image.

Step 5: Now change the code as need basis. In the SRC attribute, give your image name which you uploaded in step 3. To make other changes in it like Width, Height,Text etc. you can change the code. Click ok and then Save it.

Now Reload the Portal then you will see the changes in it.


Click Here to know, How to apply logo in ADX Retail Portal.

Click Here to know, How to a new Product Category in Product catalog of ADX Retail Portal.