Sunday, November 25, 2012

TF237002: Cannot open the document because Microsoft Excel 2007 or later, or one of its components is not installed.


One of my colleagues got the following error each time he tried to export workitems to Excel from within the Team Explorer 2010 client:

    TF237002: Cannot open the document because Microsoft Excel 2007 or later, or one of its components is not installed.

It took me some time to figure out what was wrong:

During the installation of Office 2007 he disabled the Office .Net Programmability Support.

To enable it you need to modify your installed version of Office and install this option.

1. In Add/Remove programs, locate your Office application and select it.
2. Click on the 'Change' button
3. Select 'Add or Remove features' and click 'next'
4. Select 'Choose advanced customization of applications' and click 'next' OR select something like 'Add .Net programmability support'.
5. In the tree view, expand 'Microsoft Office Excel' and make sure the .NET Programmability Support option is set to 'run from my computer'.
6. Click 'update'.


Donot forget to give your comments /suggestions and refer to your friends.

Enable Excel 2007 integration with TFS 2010


If you installed Office after installing Team Explorer 2010, it’s possible that the Excel button in Team Explorer and the Team Add-in in Excel are disabled.

To (re-)enable this, execute the following steps:

    Open Excel 2007.
    Click the Office button in the left corner. A menu is loaded.
    Click the Excel Options  button at the bottom of the menu.
    Select the Add-Ins tab on the left. A list of available add-ins is shown.
    At the bottom select COM Add-ins from the dropdown and press Go.
    Check the Team Foundation Add-in and click OK. The Team bar should be available.

Remark: TFS 2010 requires Office 2007 or higher to enable the Office integration. However it’s still possible to use Office 2003 by using the Team Explorer 2008 and Forward compatibily pack to connect to TFS 2010(although you’ll loose some functionality).


Donot forget to give your comments /suggestions and refer to your friends.

Monday, November 5, 2012

Export table data to Excel using jquery


<html>
<title>Export Table Data To Excel</title>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
<style type="text/css">
body
{
font-size: 12pt;
font-family: Calibri;
padding : 10px;
}

table
{
border: 1px solid black;

}
th
{
border: 1px solid black;
padding: 5px;
background-color:grey;
color: white;

}
td
{
border: 1px solid black;
padding: 5px;
}

input
{
font-size: 12pt;
font-family: Calibri;
}
</style>
<script type="text/javascript">
$(function(){
$("#btnExport").click(function(e) {
window.open('data:application/vnd.ms-excel,' + $('#dvData').html());
e.preventDefault();
});
});
</script>
</head>
<body>
<br/>
<div id="dvData">
<table>
<tr>
<th>Column One </th>
<th>Column Two</th>
<th>Column Three</th>
</tr>
<tr>
<td>row1 Col1</td>
<td>row1 Col2</td>
<td>row1 Col3</td>
  </tr>
  <tr>
<td>row2 Col1</td>
<td>row2 Col2</td>
<td>row2 Col3</td>
  </tr>
 <tr>
<td>row3 Col1</td>
<td>row3 Col2</td>
<td>row3 Col3</td>
  </tr>
</table>
</div>
<br/>
<input type="button" id="btnExport" value=" Export Table data into Excel " />
</body>
</html>


Donot forget to give your comments /suggestions and refer to your friends.

Check Browser Plugins Using Jquery


(function($){
if(typeof $.browser==="undefined"||!$.browser){
var browser={};
$.extend(browser);
}
var pluginList={
flash:{activex:"ShockwaveFlash.ShockwaveFlash",plugin:/flash/gim},
sl:{activex:["AgControl.AgControl"],plugin:/silverlight/gim},
pdf:{activex:"PDF.PdfCtrl",plugin:/adobe\s?acrobat/gim},
qtime:{activex:"QuickTime.QuickTime",plugin:/quicktime/gim},
wmp:{activex:"WMPlayer.OCX",plugin:/(windows\smedia)|(Microsoft)/gim},
shk:{activex:"SWCtl.SWCtl",plugin:/shockwave/gim},
rp:{activex:"RealPlayer",plugin:/realplayer/gim},
java:{activex:navigator.javaEnabled(),plugin:/java/gim}
};
var isSupported=function(p){
if(window.ActiveXObject){
try{
new ActiveXObject(pluginList[p].activex);
$.browser[p]=true;
}catch(e){
$.browser[p]=false;
}
}else{
$.each(navigator.plugins,function(){
if(this.name.match(pluginList[p].plugin)){
$.browser[p]=true;
return false;
}else{
$.browser[p]=false;
}
});
}
};
$.each(pluginList,function(i,n){
isSupported(i);
});
})(jQuery);


Donot forget to give your comments /suggestions and refer to your friends.