SpreadsheetLauncher.GetCLSID Method

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Gets the class identifier (CLSID) of the SpreadsheetLauncher Control control.




An expression that returns a SpreadsheetLauncher object.

Return Value

A String that contains the CLSID.


Use the CLSID value to construct an <OBJECT> tag to which Internet Explorer can bind calls.


This example uses the SpreadsheetLauncher.ImportList Method method to import data from a spreadsheet to a SharePoint site. After creating a SpreadsheetLauncher object, the example uses the GetCLSID method to construct an <OBJECT> tag for writing the object to the page.

<SCRIPT language="JavaScript">
SpreadsheetLauncherButton = new ActiveXObject("SharePoint.SpreadsheetLauncher.2");

if (SpreadsheetLauncherButton) {
   var launcherCLSID = SpreadsheetLauncherButton.GetCLSID();
   var objectTag = '<OBJECT classid="clsid:' + launcherCLSID + '" 
      id="SpreadsheetLauncherObj" style="display:none;"></OBJECT>';

   document.write(objectTag); }

function DoImportSpreadsheet(){
   var form = document.frmNewList;
   var resultUrl;

   resultUrl = SpreadsheetLauncherObj.ImportList(form['List'].value," ", false, 'http://STSServer1/_vti_bin/owssvr.dll?CS=109&');
   return false;}

The previous example assumes the existence of a form such as the following, which calls the DoImportSpreadsheet function and passes several INPUT values to the server.

<FORM name="frmNewList" onsubmit="return DoImportSpreadsheet();">
   <INPUT type="Text" title="Name" name="List" maxLength="255">
   <INPUT type="File" name="SpreadsheetFile" style="behavior: 
   <INPUT type="Hidden" name="ListTemplate" value='SpreadsheetImport'>
   <INPUT type="Submit" value="Import">
   <INPUT type="Hidden" name="Project" value="ows">
   <INPUT type="Hidden" name="Cmd" value="NewList">