Excel Web Access and OData Connections: Data Refresh

Have you ever tried to use a SharePoint list to populate a Power Pivot Graph in excel ; and then render the graph in SharePoint using Excel Web Apps? – Sounds pretty cool eh!?

Not Quite.

I created a SharePoint list, for e.g. Profit Loss , which details the a financial summary of a project, e.g.  (Profit is a calculated column)


Having created the list, I opened up Excel and created a OOData Data Feed connection (below) and generated a graph based on the data within the list.


Graph below


Seems relative.

However, if you make a change to the SharePoint list, the excel web access web part in SharePoint  does not dynamically update to show an updated chart to reflect the change made on the list.  You must manually open the excel sheet, refresh data connections and then save the excel sheet again to update the excel web access web part.

If you manually refresh the Excel web part by clicking Data, Refresh Selected DataConnection, the web part loads  the new updated data;

Screenshot below showing new data


Screenshot below showing a manual refresh


Result after doing a Manual Refresh (notice the profit)


If the entire page is refreshed, the webpart reverts back to the original, see image below.

Normal Chart


I noticed that if you have the excel sheet open in real time and make a change to the SharePoint list – the Excel will in fact update – but it does not save the sheet. (You can check the modified date on the library).

Having done further tests – I also noticed the Pivot Chart had a ‘Refresh data when opening the file’ – I checked this and saved the excel file to my sharepoint document library. DataRefresh

The Excel Web Access web part now showed an Warning when the page was loaded, as below


The user must click Yes to load the worksheet – which as a result refreshes the latest data. Not, really a solution though.

For On-Premise users – we can resolve the warning message by adding the Excel file as a trusted location in the Excel Services Application; however, the Excel Service Service Application is not available in SharePoint on-line :(

I guess the only viable solution is to for a user to manually open the Excel sheet(s) and do a refresh all and then save the worksheet back into SharePoint; thus updating all the Power Pivot Charts..

I will let you know if there are any updates on when or if the Excel Service Application is available so we could add worksheets into the trusted locations.

There is a good blog article here which could be of help should you run into a similar issue:


Azure Storage Explorer

I often find myself having to transfer or download files from my Azure Storage Account.

There are a number of ways to download your files, such as from your Azure subscription; there are also a lot of third party tools out there that can help you transfer and or download your files such as Zudio which is a cheap web based subscription service and Azure Storage Explorer from codeplex  (This one is really good! ).

However recently, I have been using Azure Explorer by Cerebrata.
Azure Explorer is a fantastic way to upload, download files to and from your Azure Storage Container while at the same time ensuring security is maximised, the tool effectively allows you to manage your Azure files in an easy to use interface.
You can download Azure Explorer here.

Firstly, In order to use the tool you will need to have your Azure Storage Account set up and your Storage Account key; then download the tool from the link above.

Once the Azure Explorer is downloaded you will have to:

1. Add your Azure Storage Account


Then click on ‘Test Connection’ to ensure you can connect to your Azure Storage

successful Connection

2.  Once connected, you will be able to access to your files / BLOBS in user friendly interface, in which you can upload / download / delete etc…

Below shows the storage account


Click into the storage account will show the containers within the storage account.


Clicking into the containers will show the files.


I particularly find this tool useful for sharing with customers, as it enables me to send files to customers in an easy, free secure way.

How safe is it storing data in the cloud?

My journey into work last week consisted of me having a debate with a few friends about storing data on-premise vs storing data in the cloud, in particular office 365.
I was able to discuss some key points and advantages of using office 365, so I thought it would be a good idea to give a brief overview on some of the advantages of using office 365 on my blog and more importantly outline what measures Microsoft take to ensure that ‘our’ data is safe in the cloud.

Firstly, its important to understand that Microsoft offers various levels of security to its users within Office 365.
No one has specific access to data, No third party, literally no one.
Each data centre (where data is stored) has a strict control of access as to who can actually enter the data centre & what they can do; this is governed by what Microsoft called ‘Lock Box’. Essentially  meaning that if an engineer does have to go into the data centre; then their is a strict access control as to what the engineer can do – at no point will that engineer have access to the data; its mainly just troubleshooting tasks.

Below is a brief overview on some of the various layers of security offered on different layers.

Network Layer – Firstly all data on Office 365 is encrypted in transit using TLS/SSL; this ensures that data is confidential; (previous blog post on SSL) – so if a user did ‘intercept’ communication; then the results would be scrambled and would be of no use to them.

Physical Layer.  On Premise, an IT Admin or IT staff know exactly where the disk that contains the data is, they know exactly which computer it is on and exactly how to get to it; this is generally how an premise environment is run – in that someone knows exactly where the data is. A malicious user once on the server has the ability to do whatever they want, i.e. run code, delete data, copy data, remove the drive etc.

In the cloud world, the only folks who can get into the data centre are the engineers, for e.g. during maintenance – but their are strict access controls in place to ensure data is not accessed, its mainly just troubleshooting tasks.
Having ability to find out whose server is whose, or which partition data lives on or where it lives within the data centre is like finding a needle in a haystack, the size of the data centre and the amount of servers would mean a malicious person would never know which disk drive belongs to a particular person.
But in a worse case scenario supposing an engineer pulls a drive out? – Microsoft have invested in BitLocker which basically means that the drive that is pulled out will be wiped.

Furthermore Microsoft have  a Blue team and red team.
The red team are constantly trying to ‘hack’ into Microsoft Data centres whilst at the same time the Blue team are consistently trying to prevent those attacks.

Logical Layer. No code that is not known to Microsoft is allowed to be executed on any of the servers; i.e it cant get random code out of the environment and run it on servers . Only known processes are white listed to run on servers, This would make is virtually impossible for a malicious user to run a malicious code on a server (that’s if they ever got on).

User Layer  – The office 365 admin portal offers much more in terms of security.

>Multi Factor Authentication – Multi factor Authentication is a two way sign in process, making it harder for a malicious user to get into your account; When a user signs into their Office 365 account with their username and password – an additional layer of security must be acknowledged via a phone call or text before that user can sign in.  This feature is also available on most Hotmail / Outlook accounts.

> Data loss prevention – DLP essentially scans emails for sensitive information, such as “Credit Card Number”.  Warnings can be given to the sender alerting them and give the sender control of weather they would like to send the email or not. If the sender agrees to send the email, then it can be encrypted using TLS encryption or we could apply rights management

> Rights management. Rights Management is a list / library setting (within SharePoint) that allows site owners to protect attachments stored against list items and / or supported file types.
For e.g. If a document is downloaded; the file is encrypted  so only authorised people can view it; furthermore the file can be have restrictions imposed on it; making it impossible for users to print, copy, save a local copy etc.

There is a fantastic white paper which is available here to download which details the above with additional security measures Microsoft have  taken to ensure data is safe in the cloud.



SharePoint & SSL

Back in October I  was tasked with installing an Intranet / Extranet for a customer.  Installing and configuring the SharePoint was all done, the customer however required secure communication over the extranet so external users could communicate securely over https.
This blog article will detail how I set up SSL (Secure Socket Layer) and shall furthermore describe how SSL works.

Firstly, I extended the Intranet URL to the Extranet Zone.  This ensured that the external users could access the same information as Internal Users.
(When you extend a zone, SharePoint automatically creates an Alternate Access Mapping (AAM) , this basically tells SharePoint how to map the request to a URL)

1. Highlight the web application you wish to extend and select the extend tab from the ribbon


2. From the Next screen I populated the following fields

Ensure the Extended zones is on Port Is 443

Ensure the Extended Zones is configured to run on SSL


Check the URL and the zone is correct

Once you Click OK – SharePoint will create an additional zone for you in IIS (as below)5.IIS

Once your IIS site is created, you can attach you Certificate to the site.

3. To create the Certificate, in IIS click ‘Create Certificate Request’


Populate the Distinguished Name Properties (as below) and Click Next


Save the .txt file. The txt should be used to request the certificate from a verified issuer such as VeriSign or GoDaddy.

3. Once your certificate .cer file is on the web server , right click it and select Install Certificate. (If you have multiple WFE servers, do this step on all of them)

4. Ensure the certificate is imported onto the Local Machine and placed in the Personal Store.


5. Head back into IIS and double click Server Certificates.


Your Certificate will be visible.

6. Go back to the extended SharePoint Site, Right Click and select Edit Bindings

select Edit

Select your certificate from the SSL dropdown and Select OK.

7. Your Certificate is now attached to your Web Application.

(Move the Certificate into the Trusted Authority Store)

8. Navigate to your Extended SharePoint site and assuming you have your DNS records set up; it should load with problems with the green padlock :) (as below)


Now having set all that up; what does attaching a certificate to the SharePoint server actually do?

1. Your computer  makes a request to access the http://extranet.domain.com site

2. The server where the certificate is installed for http://extranet.domain.com  issues a Public Key to the requesting computer.

3.Your  Computer then encrypts the data with the Public Key (that was sent from the server)  and sends data back to the server.

4. The Server then decrypts the data using the Private Key – and only the server with the Private Key can decrypt the data..
If anyone intercepts the data in between, the data will be ‘Jibberish’.  The Private Key is the only way the data can be decrypted.

Target Audiences Column appearing as GUID

So, I have been working on a project for a customer who wanted to Target Audience individual list items in SharePoint….Simple task right?.

I allowed the management of content types on my list and added in the ‘Target Audience’ site column which is available to us out of the box.  This bit all works fine.

The actual problem arises when you start to audience target the list items.

When you audience target list items, the audience appears as a GUID in the list view (as below)


But if you remove the audience from the first list item, the audience does not appear as  a GUID (as below)


So basically, if the first item in the list has an audience, then ALL the items appear as GUIDS.
As soon as you remove the audience from the first list item, the audience name loads correctly i.e. doesn’t display the GUID.

I did a bit of further reading on this ,  A lot of people have said this issue is by design, but surely it can’t be a design issue. No ones wants to see a GUID in the view.
I found this issue is evident on all on-premise versions of SharePoint (2007, 2010 and 2013) and SharePoint on-line .

Having contacted Microsoft about the issue; they confirmed that this issue is a Bug in SharePoint and there is currently no fix for it :(
The current workaround is to remove the audience from the first item :S

Awaiting a response as to when it will be fixed and why it hasn’t been fixed since 07. Until then, I guess we have to live with it.

**UPDATE – Microsoft responded to my reply as to why this issue had not been fixed since 07  & when they plan to have a fix for it.  Below is the response.

This bug will not be fixed. SharePoint uses XSLT stylesheets to render list views. A list is rendered as an HTML table and the value of a field is rendered into the appropriate cell of the table by a simple XSLT template from the fldtypes.xsl file located in %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\LAYOUTS\XSL. And this issue relates to the .xsl file. 

So there you have it folks, an unfixable bug in SharePoint :(

I will have a play around to see if we can have another workaround to this issue – where we don’t have to remove the audience from the first list item. Will keep you posted!

 **UPDATE – Temporary Fix to Audiences appearing as GUID

Hi All, finally got around to finding a temporary fix to this problem.

As the GUID on Target Audiences only appears on the first item in the list, we need to find a way of hiding the first item… Having tried to use filters on the view to hide the first ID – the problem still remained, (because the first item in the list will be item 2 If you hide item 1)

A Solution that worked for me was adding the snippet web part to the actual list and then adding a bit of code to it. See below.

1. Create a bogus item as the first item in the list. Make sure that this item has an ID of 1. (So it has to be the first item in the list)


1. Edit the list by selecting the cog in the corner and Edit Page


2. Insert the snippet web part on top of the list and insert the following code:

.ms-listviewtable > tbody > tr:first-child{
   display: none;

3. Save the page

4. Voila


The snippet is just basically just hiding the first item in the list.

*I strongly recommend you try and test this before you insert any code onto a PROD environment.

User Profile Stuck on Starting.

When installing UPS. Never log in as the Farm account.. Just ensure the farm account is the local admin on the SharePoint server.

If the ups sync service is stuck on starting, run the following Powershell command (PoSh)

 Get-spserviceinstance | select TypeName, ID

This will return the ID of the service that is stuck,

Then run the following PoSh command once you have the ID

Stop-SPServiceInstance -id “id of service” .

There are occasions when the service still won’t stop even after running the Stop-SPServiceInstance PoSh command (This can occur when you start the UPS whilst logged in as the farm account).

One way of stopping the service (if the Stop-SPServiceInstance doesn’t stop it) is to use the following stsadm commands. (You can also run the commands below in Powershell – no need to load any type of SnapIn.) – but for my example, I used STSADM.

stsadm -o enumservices > c:\services.txt – This produces a .txt file which gives a list of services and shows the name of the service you need (as below)



Then run stsadm -o provisionservice -action stop -servicetype “Microsoft.Office.Server.Administration.ProfileSynchronizationService, Microsoft.Office.Server.UserProfiles, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c” -servicename FIMSynchronizationService

The service type (in italics) is the from the service.txt (with the red border) :)

Upgrading a Multi-Server SharePoint Farm


I was having a nightmare upgrading a multi-server sp13 farm from Standard to Enterprise . Having inserted the Enterprise Key in the usual place in Central Administration,  – it kept throwing errors every time… (below)


I spent lots of time troubleshooting this, such as,  checking the error Logs, clearing the cache, to name a few.
In the end One line of PowerShell fixed it…

Set-SPFarmConfig -InstalledProductsRefresh

So if any of you try to upgrade a multi server farm from the usual way of inserting the product key & doesn’t work, below are the  steps I followed,

  1. Insert the product key in the convert license type or Enable Enterprise Features. (let it error)
  2. Run the above Powershell Command.
  3. SharePoint should upgrade to Enterprise
  4. Remember to enable Enterprise features on all existing web applications and site collections.