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.
Imports a list to the SharePoint site and returns the URL for the new list.
expression.ImportList(List, Title, QuickLaunch, URL)
An expression that returns a SpreadsheetLauncher object.
A String that contains the name of the list to create.
A String that contains the description of the list to create. An empty string means a description is not displayed on the Create Page..
true if a link to the default view page of the new list is added to the Quick Launch bar; otherwise false.
A String that contains absolute URL for Owssvr.dll, which is located on the server in the following directory:
Local_Drive\Program Files\Common Files\Microsoft Shared\web server extensions\12\ISAPI
A String that contains the URL.
The user is automatically navigated to this location when the import is complete.
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.
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: url(#SpreadsheetLauncherObj);"> <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"> </FORM>