Sunday, August 5, 2012

Export the Excel without a custom code in Share point 2010


Export the Excel without a custom code in Share point 2010:

Requirement:

We have requirement to export the list to excel without custom coding on click of an Excel icon at the top of the list view.
·        Add the List view to a page
  • ·         Add a content editor web part at the top of the list view
  • ·        Add an Excel icon in the same with href property value as below


{siteurl}/_vti_bin/owssvr.dll?CS=109&Using=_layouts/query.iqy&List={GUID of list}&View={GUID of view}&CacheControl=1

For GUID of List & List View:
  • ·         Go to your list
  • ·         Click on List Settings
  • ·         Click on the View from the list of Views in the settings page
  • ·         Get the List GUID and View GUID
  • ·         Modify the GUID with remove %7B, %7D & replace %2D with “–“


For Example:

In the above,
GUID of List is 93A56B7A-E6C5-4329-AEC8-BA80D4CA6A58
GUID of List View is 2063B695-5FC4-4700-89B3-FF665E731D7D

Add the link with anchor tag.




No comments:

Post a Comment