Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upFeature Request: Add Group and Ungroup columns & rows #32
Comments
|
I've been working on this for the past while, and I currently have two separate working functions - |
|
@JoshuaSturm I think having two functions isn't necessarily a bad thing. It's consistent with the way you set the size of columns/rows in Having said that, it could be beneficial to have a single function behind the scenes that is actually doing the work and uses an argument to determine whether it's operating on rows or columns. Are these functions included in any of the branches on your GitHub? I'd love to take a look at them! |
|
Many thanks @JoshuaSturm , this will be a very useful functionality, indeed. Also it would be great to include, as an option, the possibility to collapse some groups of lines or columns. This functionality would certainly fix at the same time the issue already described two years ago "Collapsed rows / columns are lost" : awalker89/openxlsx#383 |
|
@aecoleman Thanks for the feedback. You're right, and after thinking about it more, I kept the two functions separate. It is more consistent with the rest of the API, as well as the current code structure (rows and columns are handled separately). @FrancoisR95 I added the ability to collapse rows/columns, and, from what I remember when I last worked on it, preferences were being preserved. Thanks! |
|
@JoshuaSturm I know you said that you were busy, but just wanted to give you a nudge and say that I'm really looking forward to taking a look at this! |
|
Hi, @aecoleman. Thanks for the reminder. My current progress is saved here: https://github.com/JoshuaSturm/openxlsx/tree/add-groups I also haven't yet tested on multiple worksheets or loading workbooks. Please let me know of any bugs you come across. Thanks! |
|
@JoshuaSturm If you have a name conflict for the |
|
@FrancoisR95 Thanks for the suggestion. The issue wasn't so much the names, but that having conflicting values would lead to errors. For example, To keep the changes to the underlying structure minimal, I decided that setting the I'll probably open a PR tomorrow. |
|
Thank you @JoshuaSturm for the explanations. This seems a good solution which you describe, that "setting the |
Hi @ycphs
I have a problem to output a data frame to xlsx with certain styling like grouping several columns based on some conditions.
I think it will be great if openxlsx can have functionality to do grouping & ungrouping columns & rows, while user need to do some manipulation on data frame.
Currently I am doing it in a VBscript, and call it from R, which hard to trace bugs.
Here is the functionality as discussed, under 'Data' tab in excel