{introducedin:7.1.0.1855}
{description}
{excerpt}Imports data from a SharePoint View to cells in the worksheet. The new data will overwrite values and formulas in the target worksheet cells, but existing formatting will be preserved.{excerpt}
{signature:C#}
public static Area ImportData(this Worksheet worksheet, Cell cell, Microsoft.SharePoint.SPView view, Microsoft.SharePoint.SPList list, DataImportProperties props)
{signature}{signature:vb.net}
Public Shared Function ImportData(ByVal worksheet As Worksheet, ByVal cell As Cell, ByVal view As Microsoft.SharePoint.SPView, ByVal list As Microsoft.SharePoint.SPList, ByVal props As DataImportProperties) As Area
{signature}
{parameters}
{param:worksheet}The current Worksheet object which is calling ImportData
{param}
{param:cell}The cell at which to start entering the imported values.{param}
{param:view}SharePoint View to use as a data source for the Area starting at the given cell{param}
{param:list}SharePoint List associated with the SharePoint View{param}
{param:props}A [DataImportProperties|DataImportProperties] object that contains a set of properties that will determine the behavior of the data import.{param}
{returns}An [Area|Area] object representing the set of cells populated with the imported values.{returns}
{remarks}
{note}This is an extension method for the Worksheet object to be used for binding SharePoint data to spreadsheets from within SharePoint.  To use this method, you must add a reference to SoftArtisans.OfficeWriter.ExcelWriter.SharePointIntegration.dll{note}
{remarks}
{example}{code:csharp|title=C#}
Area importedArea = ws.ImportData(cell, myView, myList, importProps);{code}
{code:vb.net|title=vb.net}
Dim importedArea As Area = ws.ImportData(cell, myView, myList, importProps){code}

{example}