dhatim / fastexcel

Generate and read big Excel files quickly
Other
677 stars 122 forks source link

Is there any function to group rows? #259

Closed dgappc closed 1 year ago

dgappc commented 1 year ago

Excel has the functionality to be able to group rows, so that you can hide and show the rows by clicking bars in the leftmost column.

Is this functionality supported while writing an excel file using fastexcel?

Thanks

meiMingle commented 1 year ago

If you just hide multiple rows of cells, you can do this


IntStream.rangeClosed(2,9).forEach(ws::hideRow);
meiMingle commented 1 year ago

But I found that the functions that hide rows or columns might be a bit problematic, see #261 . I'll try to fix it.

dgappc commented 1 year ago

I am afraid hiding rows is not what we are looking for, but rather grouping rows. See the attached excel with open/close buttons on the left. Currently we are doing this with POI, but it is rather slow.

Thanks Budget_HR_Base_Salary_Expense_20230131193917.xlsx

meiMingle commented 1 year ago

OK I get it, there is no such feature at the moment, I will try to implement it

dgappc commented 1 year ago

Thanks very much.

meiMingle commented 1 year ago

@dgappc Now it's available in v0.14.18, you can try it

dgappc commented 1 year ago

Great! It works, thanks.