Sometimes, the customer would like to see the SharePoint list item with a specific design instead of the default view, for which the developers have to develop an app or web part.
But in this example, I will show you how to create a dynamic web view of a SharePoint list item using Excel Web Access Web part.
Imagine a customer requirement is as below
A State Government would like to start a "Develop my Village" program for which they would like to gather information of all the villages (from each department) and store it in a database. After that, they would like to view each village information in a village report card format and share it with the central government for review.
Let's follow the below steps to store the village information in a SharePoint list and view the SharePoint list item in a village report card format.
Step 1 - Create a Village list in SharePoint site with a set of columns.

Step 2
Add a New Item and fill in the village information.
Step 3
Once list item is created, click on Iiew item to see the default SharePoint list item view.

Step 4
Now, instead of seeing this default SharePoint item view, the Government would like to see the list item as in the below design (which they call a Village Report Card).

Design a similar design of Village Report Card Template in Microsoft Excel. Download the sourcecode.zip file to see the sample Excel template (VillageTemplate.xlsx).
- Open Microsoft Excel.
- Rename the 1st two sheets to Village Raw Data and Village Report Card and delete the last sheet (Sheet 3)
- Open Village Raw Data sheet.
- Select 26 columns - click Insert Tab - click on Table to create a table. In this example, 26 referred to store 26 columns information from the Village list.
- This time, select the same 26 columns and 3 rows and then put a name to the table range. In this example name of table range is 'VillageRecords'.
- Now click on Formulas Tab - Click on Name Manager - Verify the name of table range is "VillageRecords".
- Then just imagine, 2nd row of this table range will contain the village list column names and 3rd row will contain the respective column value.
- See below screenshot for your reference

- Now, open the Village Report Card sheet and design the sheet as per your requirement.
- Map the value from Village Raw Data sheet.
- In this example, I have mapped all the column information from Village Raw Data sheet.
- See the below screenshot for your reference.

Step 5
Once the Village Report Card Excel template design is ready, save the template file and upload it to a document library.

Step 6
Open the village list view item page (DispForm.aspx).
Example of the view item page URL is shown below.
http://sam.shapoint.com/sites/testsite/Lists/Village/DispForm.aspx?ID=1
Add an Excel Web Access Web part to the page.
Screenshot for your reference

Edit the Excel Web Access web part and select the workbook (VillageTemplate Excel file from the document library).
Disable and enable the options as below in Excel Web Access web part.
Screenshot for your reference

Set the height, width and chrome state in Excel Web Access web part.

Click "Apply" to update the settings in Excel Web Access web part.
Step 7
Create a JavaScript file to read the list item column name and corresponding column value based on All Items list view. Download the sourcecode.zip file to see VillageReportView.js and jquery-1.11.1.min.js file.
Logic behind VillageReportView.js file










Humayun Kabir MamunPosted Feb 4, 2018, 10:46 PM
Thanks Samarendra for this nice article...