SpreadSheetAddPagebreaks and SpreadSheetAddAutofilter

We have added 2 new methods in spreadsheet.

1.SpreadSheetAddPagebreaks 

Spreadsheets can have pagebreaks which breaks sheets into multiple regions when you want to print it. You can put these line breaks along rows as well as columns.

Here is the syntax :

SpreadSheetAddPagebreaks( ExcelInfo info, String rowbreaks,String colbreaks )

where info is the ExcelInfo object, rowbreaks are the row numbers and colbreaks are the column numbers where you want to put the page breaks.

For example, SpreadSheetAddPagebreaks(info,”,’2′) breaks the sheet into two parts with columns A,B,C in the first and D,E,… in the second. Similarly, SpreadSheetAddPagebreaks(info,’2′,”) breaks the sheet into two parts with first three rows (rownum=1…3) in the first part and rows starting with rownum=4 in the second.

Here is another example :

SpreadSheetAddPagebreaks(  info, ‘1,2’,’3,5′ )

This will put page breaks on rows 1 and 2 and columns 3 and 5. So if this sheet is send for print it will have multiple regions to be printed.

 

2.SpreadSheetAddAutofilter 

This method helps in enabling filtering for a range of cells. Filtering data is a quick and easy way to find and work with a subset of data in a range of cells or table. For example, you can filter to see only the values that you specify, filter to see the top or bottom values, or filter to quickly see duplicate values.

Here is the syntax :

SpreadSheetAddAutofilter ( ExcelInfo info, String autofilter )

where info is the ExcelInfo object, autofilter is the cell range

Here is example :

SpreadSheetAddAutofilter (  info, ‘A1:C2’)

This will apply autofilter on the sheet for the cell renage A1 to C2

One thought on “SpreadSheetAddPagebreaks and SpreadSheetAddAutofilter

Leave a Reply

Your email address will not be published. Required fields are marked *