We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Problem with AutoFilter - shows- but not responding

Hello,
I have problem with AutoFilter in Aspose.Cells.
I´m using 1.9.4.7 version of Aspose.Cells for Java.
Problem is, that when I generate worksheet with enabled AutoFilter over some data, the AutoFilter arrow appears on column header but I cannot change value of filter. The filter arrow does not respond to mouse clicks.

I´ve attached file generated with this test case:

ByteArrayOutputStream xlsStream = new ByteArrayOutputStream();

Workbook workbook = new Workbook();

Worksheet worksheet = workbook.getWorksheets().getSheet(0);

String[][] data = new String[][]{{“Values 1”, “Values 2”, “Values 3”},
{“Value 11”, “Value 12”, “Value 13”},
{“Value 21”, “Value 22”, “Value 23”},
{“Value 31”, “Value 32”, “Value 33”},
{“Value 41”, “Value 42”, “Value 43”}};

worksheet.getCells().importArray(data, 0, 0);

AutoFilter autoFilter = worksheet.getAutoFilter();
autoFilter.setRange(new CellArea(0,0,4,2));

workbook.save(xlsStream);


Thanks for help

Kind regards

Hi,

Thanks for the template file with code,

We will figure out the issue soon.

Thank you.

Hi,

After checking your output file, I found no problem at all related autofilter when I open it into MS Excel 2002-2007, the autofilters just works fine here.

And when I tried your code to generate the file, it works fine without any problem related autofilter:

Sample code:

import java.io.*;
import com.aspose.cells.*;

class AutoFilterProblem2{


public static void main(String[] args) throws Exception
{

ByteArrayOutputStream xlsStream = new ByteArrayOutputStream();

Workbook workbook = new Workbook();

Worksheet worksheet = workbook.getWorksheets().getSheet(0);

String[][] data = new String[][]{{"Values 1", "Values 2", "Values 3"},
{"Value 11", "Value 12", "Value 13"},
{"Value 21", "Value 22", "Value 23"},
{"Value 31", "Value 32", "Value 33"},
{"Value 41", "Value 42", "Value 43"}};

worksheet.getCells().importArray(data, 0, 0);

AutoFilter autoFilter = worksheet.getAutoFilter();
autoFilter.setRange(new CellArea(0,0,4,2));

workbook.save("e:\\files\\autofilter_out1.xls");

}

}

And attached is the output file, could you check it.

Thank you.

Hi
Your file is ok, but when I create xls file exactly same way as you, my file have invalid autofilter. I´ve tried to open invalid file in Excel 2007, and it is ok. But when I open it in Excel 2003 (czech language mutation) autofilter is not responding. I don´t understand where is the problem, because we both have same code to create excel file, but mine has invalid autofilter. Which version of Aspose.Cells for Java you used to create this example file?

Thanks

Hi,

Well , it's strange. We will check it soon.

Any ways could you try the attached version.

Thank you.

Hi,
With version 1.9.4.25 it works fine…
Thanks a lot