use Win32::OLE; my $ex=Win32::OLE->new('Excel.Application'); $ex->{Visible}=1; my $book=$ex->Workbooks->Add; my $sheet=$book->Worksheets(1); ## Here you would populate the spreadsheet ## I assume that the titles of the columns are contained in ## cells A1-Z1 here... $sheet->Range("a1:z1")->AutoFilter; ## Now you have dropdowns for columns A1-Z1 that let you ## filter on the given column.