Java POI Excel creating new column and new rows

后端 未结 5 894
慢半拍i
慢半拍i 2021-01-16 05:09

Ok so Im iterating over a list and instead of inserting values into cells horizontally, im putting the values in the cells vertically.

It works fine for the first ti

5条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-16 05:57

    You are incrementing the row index wrong. row++ will increment after you create the second row. So you are creating two rows at index 0. If you change all your row++ to ++row it should work.

提交回复
热议问题