Spreadsheet setRowHidden Maximum

Hello,

I tried to hide 1000 rows within the spreadsheet. But with a number of more than 199 hidden rows, I get an “java.lang.ArrayIndexOutOfBoundsException: 200” exception.

[code]
int rowNumber = 200;

    for (int f = 0; f <= rowNumber; f++)
    {
        Row row = spreadsheet.getActiveSheet().createRow(f);
        row.createCell(0);
    }
    
    for (int i = 0; i <= rowNumber; i++)
    {
        spreadsheet.setRowHidden(i, true);
    }

[/code]This is the complete exception:

java.lang.ArrayIndexOutOfBoundsException: 200
    at com.vaadin.addon.spreadsheet.Spreadsheet.setRowHidden(Spreadsheet.java:2147)
    at com.example.topicproject.TopicprojectUI.init(TopicprojectUI.java:45)
    at com.vaadin.ui.UI.doInit(UI.java:675)
    at com.vaadin.server.communication.UIInitHandler.getBrowserDetailsUI(UIInitHandler.java:214)
    at com.vaadin.server.communication.UIInitHandler.synchronizedHandleRequest(UIInitHandler.java:74)
    at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:41)
    at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1408)
    at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:351)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

Is there a workaround?

Thanks!

Hi,

4 years later I’m running into the same issue… I spotted a pretty similar issue on github https://github.com/vaadin/spreadsheet/issues/335 but unanswered there also :frowning:

Is there any solution/workaround? Did I miss a configuration on the spreadsheet component somewhere?

Thanks in advance!

Please also see [related Vaadin thread for setRowHeight above 200 rows]
(https://vaadin.com/forum/thread/18142461).

Might be a similar problem leading to the index-out-bounds exception.