Publish Google spreadsheets data on website

Hey.. do you want to publish the data from Google spreadsheet to on your web site. The below is the solution you have to follow step by step.

1. Open drive.google.com

2. Create a new spread sheet as below

Create_new_spreadsheet

3. Create data as below

table

4. Now, this sheet has to be published then it will be available for the public access. Click on the File > Publish to the web..

publish1

5. Publish the spreadsheet as below

publish2

6. It will generate the public link for the spread sheet as below. Please copy to the any notepad

publish3

For example the link as like below and take the red highlighted key and paste as shown below

links

For your reference and to help I am providing below that link

https://spreadsheets.google.com/feeds/list/[KEY]/od6/public/values?alt=json

7. Once you have ready the above link please open in browser, you can see the json return data as below

json

8. Copy the text showing on the browser and open the site : http://jsonviewer.stack.hu/ .

9. Paste on the text tab and click on the viewer , It will show JSON data clearly to us as shown below

json2

10. Now we got the JSON data, this JSON data can be published on any website using below code.


<!DOCTYPE html>
<html>
<title>Google Spreadsheet test</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>

<script>
var sheeturl = "https://spreadsheets.google.com/feeds/list/14Pu3pPz75B96TBdF8JXvxfYSWpNziNeYBRJEo_oMerA/od6/public/values?alt=json";
$.getJSON(sheeturl, function (data) {
	var dt = data.feed.entry;
	var tbl = "<table border='0'>";
	$.each(dt, function (i) {
		//alert(dt[i].gsx$name.$t);
		tbl += "<tr>";
		tbl += "<td>" + dt[i].gsx$name.$t + "</td>";
		tbl += "<td>" + dt[i].gsx$phone.$t + "</td>";
		tbl += "<td>" + dt[i].gsx$email.$t + "</td>";
		tbl += "</tr>";
	});
	tbl += "</table>";
	$("#content").html(tbl);
});
</script>

<body>
	<div id="content">
		Display items here
	</div>
</body>
</html>

11. Open the page in browser and check the result.

12. The page will be displayed as below.

result

All the best .. Please comment below.

Read More

What is Content Type Hub in SharePoint

Content Type Hub is a central location where you can manage and publish your content types through out the organization.

Ex: You can create Content Type Hub Web Application and create few Content Types. These content types you can use in any other Web Applications and Site Collections by subscribing to the Content Type Hub. If you want to modify the content type, you can modify at Content Type Hub only. You can’t do the at tenant sites. It is an advantage to maintain same fields in one content type through the organization.

Fore more information about the CTH (Content Type Hub) please refer the below web links.

Link 1 : Understanding the Content Type Hub

Link 2 : Create Content Type Hub in SharePoint 2013

Link 3: Content Type Hub in Office 365

Link 4: YouTube video on CTH

Read More

SharePoint 2016 Review is released

Hello Guys, its wonderful news to the SharePoint folks again, few people feel LoL.. Anyway in last ignite meeting Microsoft has released SharePoint 2016 review version on August 24th.

Here is the proof I have. I got the update in my Azure account.

sp2016

For the changes which are going to be implemented, please refer this link.

http://connectedsystems.com/news/Latest%20News/SharePoint-2016-new-and-deprecated-features.aspx

If any help on this new version, please be in touch with me.

Please comment below, don’t forget.

Read More

Download the SharePoint Designer 2013

If you want to customize your SharePoint 2013 site you can use SharePoint designer 2013. You must download the SharePoint designer 2013 from below web link. One good news here is, it is free of cost. You can download and install with out license.

The below is the web link where you can get the SharePoint Designer 2013.

http://www.microsoft.com/en-in/download/details.aspx?id=35491

The things is actually SharePoint Designer is not free of cost, had to purchase license. But after SharePoint 2010 released microsoft released designer 2010 free of cost as well when released SharePoint 2013 SPD 2013 also free.

Once open the above link and clicked on the Download link, you will see two versions like 32bit & 64 bit. You can download any version which will be supported to your OS.

If you have any queries, please post a comment below.  I will respond you on time permits.

Read More

Publish SharePoint site as Internet site from Azure SharePoint Server

If you have created a SharePoint site on Azure environemnt and you want to provide the access to internet to the SharePoint sites, go through the below steps.

1. First open the ‘Central Administration’
2. Click on the ‘Configure alternate access mappings’
mapping

3. Click on ‘Edit Public URLs’
editPublic

4. Select Mapping collection.
selectApp

5. Enter the Internet URL as shown below and save.
internetURL

6. You will be seen the mapping URLs like below.
MappingUrls

But the above site will not be accessed from the internet, you can open from your local machine. To work with on internet also here you need to configure the public port to the Virtual Machine of the SharePoint Server.

Go to the dashboard of the Virtual Machine and go to ‘ENDPOINTS’ tab and create new end point with the site port number as below.

endpoint

Now try to open the site in your local machine or in friend machine. It will work.

Please comment for the more information

Read More

Flying Camera | Drone Camera | Lily Camera

Hello Guys, Its good news for the people who are waiting for personal selfie video camera and personal camera. Now Lily is working on this type camera and they are soon going to release the flying camera with fully automated. This is amazing technology for the tourists and travelers.

The camera will follow you and shoot you how do you want with out operators help, It will operate with self program.

The below image states that camera generations. Future will be the flying camera generation.

LilyCamera

For more information please watch this video.

If you want to order this camera, please check their site https://www.lily.camera

Read More

What is SharePoint

Right now you are reading WordPress right? It is also one of the site hosting platform. But it is not having the document management feature. It is having blogging and collaboration.

My insight in future about SharePoint is the one of the popular site hosting tool like WordPress these days. Almost every body having blog and few are having social community accounts. But in future every business will be maintained under SharePoint portal only.

Now a days few companies are using SharePoint and few are still sharing their documents using LAN and internet. Its fine but there are lots drawbacks. To avoid all those SharePoint is introduced by Microsoft. Every business will have SharePoint portal to share their insights and content.

For more information what is SharePoint? Please visit the below page once.

https://goo.gl/rbdJ7y

Here, you can find the steps to download the SharePoint software too and you can created online as well.

Read More

Except intersection of two arrays in c#

Hello Devs, this is the task recently I received from one of my colleague.

The Question is below

Two input Arrays

A = { “Blue”, “Green”, “Yellow”, “Red” }
B = { “Green”, “White”, “Red” }

Output should be like, The output collection should be sorted as well.
Output: {“Blue”, “Red”, “Yellow” }

The output is the not the intersection of the two arrays.

The solution is below:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ChenTest
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] A= new string[] {"Blue","Green","Yellow","Red"};
            string[] B= new string[] {"Blue","Red","Yellow"};
            
            var result = A.Except(B).Union(B.Except(A));

            foreach (string element in result)
            {
                Console.WriteLine(element);
            }

            Console.ReadKey(false);
        }
    }
}

Read More

PowerShell basic commands

Basics of PowerShell:

Windows PowerShell is a command line tool from Microsoft to facilitate the system administrators or a developer to interact with the system. When we say it is a command line tool, it means that the user interacts with the system through set of commands. We can relate the Windows PowerShell to the UNIX shells such as C-shell or BASH etc.

What is the use of PowerShell:

Windows PowerShell is one of great tools to the System Administrators. The administrators can write scripts using PowerShell commands to automate the repetitive administrative tasks, hence reducing the effort of manual work. Also, PowerShell provides a rich set of commands which can be used to do not just system administration but a variety of tasks too.

So let’s get our hands on Windows PowerShell.

In your Windows OS go to RUN-> type PowerShell and hit enter. You will get a console window.

PowerShell

Here you can see that we have given a ‘Get-Date’ command and we received the current date-time as the output. So we instructed PowerShell with a command and we got a result.

#Clear the screen
cls
#Get all PowerShell commands
Get-Command
#If you want to check the commands with the word “history”
Get-Command -Noun *history*
#Close all windows explorer and Internet explorer
Get-Process *explore* | Stop-Process
#Lock your computer
$shell = New-Object -com "Wscript.Shell"
$shell.Run("%windir%\System32\rundll32.exe user32.dll,LockWorkStation")
#Shutdown computer
Stop-Computer

For details about PowerShell, please watch the below video
PowerShell Basics – Part 1

To get more script visit the below site:
https://technet.microsoft.com/en-us/scriptcenter

Reference : https://technet.microsoft.com/en-us/scriptcenter/powershell.aspx

Read More

Get SharePoint list items using SPServices

SharePoint list items & CRUD operations using spservices

SP Services is the best programming concept for the MOSS 2007, SharePoint 2010 & SharePoint 2013 as well.

The developers who are not having the knowledge on SharePoint Server Object Model(SSOM) or SharePoint Client Object Model(CSOM) can work with this SP Services. It is the best option to them and even PHP developers and other web developers also can work who are having Javascript knowledge.

It is developed by the codeplex open source community.

In order to work with SP Services we should have JQuery also in our SharePoint Page. Because SP Services is developed using jquery.

In order to work with SP Services need to be downloaded below two references.

  1. Jquery
  2. SP Services reference

Once downloaded the above files, please go though the below steps.

Here, I have used SCHOOL list for the sample. The below is the screen shot

imgSchoolList

  1. Open your SharePoint site in SharePoint designer
  2. Go to SitePages and create sample *.aspx page
  3. Go to SiteAssets and create sample *.js file
  4. Edit page in Advanced mode as shown in image.

     imgEditAdvancedMode

  5. Add reference in header as below
    <head runat="server">
    <meta name="WebPartPageExpansion" content="full" />
    <meta http-equiv="X-UA-Compatible" content="IE=10" />
    <SharePoint:CssRegistration Name="default" runat="server"/>
    <!-- JQuery Reference-->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
    <!-- SP Service Reference-->
    <script type="text/javascript" src="../SiteAssets/jquery.SPServices-2014.02.min.js"></script>
    <!-- Custom code reference -->
    <script type="text/javascript" src="../SiteAssets/spservice.js"></script>
    </head>
    
  6. Now the sample page is included with the SP Services reference
  7. To display the list content we need to have one substitute control, so that I have created div(divContent) and input contrls for the CUD operations.
    <body>
    Welcome to the sharepoint SP Services
    <div id="divContent"></div>
    <div>
       <table>
          <tr>
             <td>Name:</td>
             <td><input type="text" id="txtName"/></td>
          </tr>
          <tr>
             <td>Marks:</td>
             <td><input type="text" id="txtMarks"/></td>
          </tr>
          <tr>
             <td></td>
             <td><input type="button" id="btnAdd" value="Add" onclick="addItem()"/></td>
          </tr>
       </table>
    </div>
    <div>
       <table>
          <tr>
             <td>ID:</td>
             <td><input type="text" id="txtid"/></td>
          </tr>
          <tr>
             <td></td>
             <td><input type="button" id="btnAdd" value="Update" onclick="itmUpdate()"/>&nbsp;<input type="button" id="btnAdd" value="Delete" onclick="itemDelete()"/></td>
          </tr>
       </table>
    </div>
    </body>
    
  8. Open *.js file in SiteAssets and write the below code
    $(document).ready(function () {
    	$.ajax({
    		success : function () {
    			loadContent();
    		}
    	});
    });
    
    //To display all items from SCHOOL list
    function loadContent() {
    	var myJson = [];
    	$().SPServices({
    		operation : "GetListItems", //Method name
    		async : false,
    		//webURL : webUrl,//pass webUrl dynamically
    		listName : "SCHOOL", // List Name
    		//CAMLQueryOptions : "",
    		//CAMLViewFields : "<ViewFields><FieldRef Name='Title' /></ViewFields>",
    		//CAMLQuery : "",
    		//CAMLRowLimit : 1,
    		completefunc : function (xData, Status) {
    			//alert(xData.responseText);
    			if (xData.status == 200) {
    				//debugger;
    				myJson = $(xData.responseXML).SPFilterNode("z:row").SPXmlToJson({
    						mapping : {
    							ows_ID : {
    								mappedName : "ID",
    								objectType : "Counter"
    							},
    							ows_Title : {
    								mappedName : "Title",
    								objectType : "Text"
    							},
    							ows_Marks : {
    								mappedName : "marks",
    								objectType : "Number"
    							}
    						}, // name, mappedName, objectType
    						includeAllAttrs : true
    					});
    				//alert(myJson);
    			} else {
    				alert(xData.status);
    			}
    		}
    	});
    
    	//debugger;
    	//JSON Viewer
    	//http://jsonviewer.stack.hu/
    	var listItemInfo = '<table>';
    	for (var i = 0; i < myJson.length; i++) {
    		listItemInfo += "<tr>";
    		listItemInfo += "<td>" + myJson[i].ID + "</td>";
    		listItemInfo += "<td>" + myJson[i].Title + "</td>";
    		listItemInfo += "<td>" + myJson[i].marks + "</td>";
    		listItemInfo += "</tr>";
    	}
    	listItemInfo += "</table>";
    	$('#divContent').html(listItemInfo);
    }
    
    function addItem() {
    	var strName = $('#txtName').val();
    	var strMarks = $('#txtMarks').val();
    	alert(strName);
    
    	$().SPServices({
    		operation : "UpdateListItems",
    		async : false,
    		batchCmd : "Update",
    		listName : "SCHOOL",
    		updates : "<Batch OnError='Continue' PreCalc='TRUE' >"
    		 + "<Method ID='1' Cmd='New'>"
    		 + "<Field Name='Title' >" + strName + "</Field>"
    		 + "<Field Name='Marks' >" + strMarks + "</Field>"
    		 + "</Method></Batch>",
    		completefunc : function (xData, Status) {
    			if (xData.status == 200) {
    				//alert('File added successfully');
    			} else {
    				alert(xData.responseXML.xml);
    			}
    		}
    	});
    	loadContent();
    }
    
    //To update the item
    function itmUpdate() {
    	var strName = $('#txtName').val();
    	var strMarks = $('#txtMarks').val();
    
    	var strid = $('#txtid').val();
    
    	$().SPServices({
    		operation : "UpdateListItems",
    		async : false,
    		batchCmd : "Update",
    		listName : "SCHOOL",
    		updates : "<Batch OnError='Continue' PreCalc='TRUE' >"
    		 + "<Method ID='1' Cmd='Update'>"
    		 + "<Field Name='ID'>" + strid + "</Field>"
    		 + "<Field Name='Title'>" + strName + "</Field>"
    		 + "<Field Name='Marks'>" + strMarks + "</Field>"
    		 + "</Method></Batch>",
    		completefunc : function (xData, Status) {
    			if (xData.status == 200) {
    				alert('File updated successfully');
    			} else {
    				alert(xData.responseXML.xml);
    			}
    		}
    	});
    
    	loadContent();
    }
    
    //To delete the item
    function itemDelete() {
    	var strid = $('#txtid').val();
    	$().SPServices.SPUpdateMultipleListItems({
    		listName : "SCHOOL",
    		CAMLQuery : "<Query><Where><Eq><FieldRef Name='ID'/><Value Type='Text'>" + strid + "</Value></Eq></Where></Query>",
    		batchCmd : "Delete",
    		completefunc : function (xData, Status) {
    			if (xData.status == 200) {
    				alert('Deleted Successfully');
    			}
    		}
    	});
    	loadContent();
    }
    
  9. Out put will be like below
    imgDisplay

The below are the operation:

ADD :

  1. Fill the values (Name, Marks) into the text boxes and click on ‘Add’

UPDATE:

  1. Enter ID:
  2. Fill the values (Name, Marks) into the text boxes and click on Update

DELETE:

  1. Enter ID:
  2. Fill the values (Name, Marks) into the text boxes and click on Update

I hope you enjoy.

Read More