Saturday, July 4, 2009

Twitter Web Client in Excel

Some fun in Excel: Twitter is a great communication and business promotion tool. While surfing the net and studying the Twitter API, I decided to create an interface so that I could post my messages on Twitter directly from my Excel worksheet. I also got good help from chandoo.org. The main part of the web client is the macro that is reproduced here for your ready reference:

Sub tweetThis()

Dim xml, tUsername, tPassword, tStatus, tResult
Set xml = CreateObject("MSXML2.XMLHTTP")

'get the username entered by you in named range tusername
tUsername = Range("tusername")
'get the password entered by you in named range tpasswd
tPassword = Range("tpassword")
'get the message entered by you in named range tmessage
tStatus = Range("tmessage")

xml.Open "POST", "http://" & tUsername & ":" & tPassword & "@twitter.com/statuses/update.xml?status=" & tStatus, False
xml.setRequestHeader "Content-Type", "content=text/html; charset=iso-8859-1"
xml.Send

tResult = xml.responsetext 'you can view Twitter’s response in debug window
Debug.Print tResult

Set xml = Nothing
End Sub

Also view the training video below:

Thursday, June 25, 2009

Sensitivity analysis before starting a new business

Ms. Sikand wanted to start a cybercafe in a newly built complex. She had done a recce and found out that many students come for studies in the region from different parts of the country. She estimated the demand with the help of her friends and also decided on what she would charge for an hour of surfing the net. In addition, she planned to provide other services like fax, photocopying, designing including web designing, scanning of documents, coffee and cakes, etc. Now she tried to vary the rates she would charge and found that the calculations cost her lot of time and effort. When she approached me, I showed her how to use the 'what-if' analysis feature in Excel 2007. This is how the Excel training video was created. She was so happy and in fact, she later tried the method with two variables successfully.