Showing posts with label Excel. Show all posts
Showing posts with label Excel. Show all posts

Thursday, January 16, 2014


A bit of Introduction 


PageBlockTableEnhancerADV is a plugin that lets you convert a normal VisualForce pageblock table into a datatable. The component internally uses the Datatables plugin to bring in features like sorting, filtering and pagination.



So what's new ?


So as planned this post is all about File Exports!, Yes files export is being ported from Datatables to PageBlockTableEnhancerADV. To export files PageBlockTableEnhancerADV uses the Datatable plugin TableTools. TableTools is very flexible plugin that hooks in to the Datatables API to give in an amazing set of exporting option.

So this version of PageBlockTableEnhancerADV with the help of TableTools brings in 
  • Export to PDF
  • Export to CSV
  • Export to Excel
  • Printable view
  • Copy to clipboard
If you are not aware about the PageBlockTableEnhancerADV or PageBlockTableEnhancer you can read about the same from the below links

List of Parameters 


  • targetPbTableIds : comma-separated Ids of the target Pageblock tables 
  • paginate : Assign true if you want to use the pagination feature,default value is true.
  • pageSizeOptions : A comma separated list of integer values that will displayed as dropdown for page size
  •  defaultPageSize : Default page size that needs to be selected (at page load).
  • enableExport : Set this option to true to enable export toolbar (new in v2)
  • exportFileName : Default filename to use when a user uses the export feature. (new in v2)

Syntax


<c:PageBlockTableEnhancerADV targetPbTableIds="mid,mid2" paginate="true" defaultPageSize="5" pageSizeOptions="5,10,20,30,40,50,100" enableExport="true" exportFileName="myFile"/>