Create Filter in Excel in Java

This article demonstrates how to create filter in an Excel file using Spire.XLS for Java.

import com.spire.xls.ExcelVersion;
import com.spire.xls.Workbook;
import com.spire.xls.Worksheet;

public class CreateFilter {
    public static void main(String[] args){
        //Load an Excel file
        Workbook workbook = new Workbook();
        //Get the first worksheet
        Worksheet sheet = workbook.getWorksheets().get(0);

        //Create filter

        //Save the result file
        workbook.saveToFile("CreateFilter.xlsx", ExcelVersion.Version2010);


Create Filter in Excel in Java