Tuesday, April 24, 2012

Bhagwan Birsa Jaiwik Udyaan: A journey with Nature

Recently I was in Ranchi, the capital of Jharkhand state. I had a chance to visit this place called "Bhagwan Birsa Jaiwik Udyaan". For the people who do not understand the name this is a beautiful biological park/zoo located around 16 kms from Ranchi. I must mention the name Birsa Munda belongs to a warrior who launched fierce battles against British rule in 1857. He is very respected and popular in Jharkhand state. This place is located in Ormanjhi. This biological park is spread in area of 104 hectare.

The best thing about this place is its peaceful and greenery atmosphere. The animals and spices stay in a natural environment. It felt like you are walking in a forest. The zoo hosts many species, animals and it does have a lake to enjoy boating facility. The trees are so dense and long; it felt like you are standing in a forest.

The ticket for this zoo costs 20 INR for each person. You can buy the ticket till 16:30 and the zoo is close after 18:00 PM.

These are some beautiful pictures which I took while visiting this place.

Tickets for the Zoo

The Panthers were enjoying after lunch

The fox was alert to the visitors

The Jungle King gave me a standing welcome

Mr. Monkey was taking a nap

The cats were busy among themselves

If you get a chance to visit Ranchi, this is definitely a place to visit.

Friday, April 6, 2012

Excel: How to use WebQuery with Excel 2007?

Learning is a never ending thing and the same apply to even basic software’s like Ms-Excel, Ms-Word etc. Recently I tried one of the amazing features of Excel 2007 called WebQuery.

WebQuery is a feature in Ms-Excel which provides us the mechanism to pull data from internet and websites to Ms-Excel spreadsheets. With the help of this feature we can pull data such as stock quotes, cities temperatures, currency rates or anything which we want to pull from various websites. This feature is quite simple to understand and work with. In this post, I have described my experiment with the WebQuery.

What do you need for WebQuery?

To use the WebQuery feature in the Ms-Excel all you need is Ms-Excel and you should be connected with the internet. Since you pull the data from live websites you need to be connected with the internet to use this amazing feature.

So where is this WebQuery feature located in Ms-Excel?

To find the WebQuery feature in Ms-Excel 2007, you can go to the Data tab. You will find the button From Web. In the tooltip it will show Get External Data from Web; this is the WebQuery magic button.

When you click on From Web button it will open the New Web Query window. This is the window where we have to tell which website data we want to pull into spreadsheet. We need to type the website address in the address bar shown in the New Web Query window.

For the demonstration purpose, I want to pull Stock quotes of Bharat Heavy Electricals Limited (BHEL) from Google Finance. My URL in this case is http://www.google.com/ig/api?stock=BHEL. This URL returns the stock price of BHEL) in XML format.

I entered the URL and clicked on Go. The New Web Query window shows the XML value which it pulled from Google finance.

Once you view the data in the web query window, you need to click on little yellow arrow button. This little yellow arrow tells the locations of data points in the web page. This little yellow arrow will turn to green once we click it. It may happen that your website has many data points but you want to pull a specific data points in your spreadsheet. When the yellow button turns to green you have to click on Import button.

Since we are pulling XML data from Google Finance the MS-Excel will track if the website data has a schema or not. If there is no schema the Ms-Excel will create one.

In the next step Ms-Excel asks where you want to put the data. You can pull the data in a XML table in existing worksheet or in an existing worksheet or in a new worksheet.

You can also specify Properties of the WebQuery from which you are importing data from website. You can specify when you want to refresh the data, what data format and layout you want to keep for the pulled data. You may like your spreadsheet to pull the data from websites when it opens or after every 5 minutes. You can specify all these settings in the Properties window.

Once I click on OK, the XML data was pulled from the Google finance and it pulled all the XML tags in the column and their values in the row.

This is how we can use the WebQuery of Excel to pull the data from website. The next thing I did was to extend my experiment with the WebQuery. I have following companies name listed in the spreadsheet and I want to pull their stock prices.

I used the following URL to pull the stock prices of these companies from Google finance.

http://www.google.com/ig/api?stock=SJVN
http://www.google.com/ig/api?stock=BHEL
http://www.google.com/ig/api?stock=GSPL
http://www.google.com/ig/api?stock=KFA
http://www.google.com/ig/api?stock=RCOM
http://www.google.com/ig/api?stock=SAIL

For each company I pull the data in XML format from Google finance and stored the result in Sheet2. The sheet two looks like following.

In sheet 1 I am simply showing the stock quotes which the WebQuery pulls and store in Sheet 2. I have setup my WebQuery properties to pull the data when I open the spreadsheet. I open my spreadsheet two times after interval and each time the latest stock price was listed.


Sheet opened at 14:40 PM IST

Sheet opened at 3:08 PM IST PM IST

I hope you like the article. Thanks! for reading it.

Sunday, April 1, 2012

SSRS: How to solve Symmetric key issue with SSRS 2008R2?

Recently I was trying to access my SSRS reports which are hosted in my system after a long vacation. The SQL Server and Reporting services both are installed on my machine. I tried to see one of the reports which I had developed for my personal use. SSRS welcome me with the following message:

The report server cannot decrypt the symmetric key that is used to access sensitive or encrypted data in a report server database. You must either restore a backup key or delete all encrypted content. (rsReportServerDisabled)

I thought what could be the reason. I checked my reporting services and it was running. So the Report Server is not disabled. I then realized that I have changed my windows password last week. Is this the reason, the SSRS behaves like this.

I remembered that I have set the Execution Account to my Windows ID and provided a password at that time. Since I have changed my password; it might be the issue.

I tried to goggled this error message and my thinking was close to the solution. I did following things to resolve the issue.

I open the Reporting Services Configuration Manager and deleted the Encrypted Content.

I went to the Execution Account screen and specified my Windows Account and password.

I then went to the Reporting Manager URL and reset the Data Source of my report. This is needed if you are deleting the Encrypt content file in Reporting Services Configuration Manager. So I went to the properties and re-applied Windows Integrated Security. My SQL Server is setup to use Windows Authentication so I did it otherwise you need to provide the credentials which your Data Source are using.

After setting up the things, I tried to run my reports and it runs successfully.

Popular Posts

Real Time Web Analytics