-
Notifications
You must be signed in to change notification settings - Fork 285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BIND_TABLE - table_style: None. New method CHANGE_RANGE_STYLE #1228
Conversation
Add methods SET_SIZE and GET_SIZE to add the posibility to change the size of the comments. These methods modify the new attributes of the class WIDTH and HEIGHT. These attributes will be read in CREATE_XL_DRAWING_FOR_COMMENTS of class ZCL_EXCEL_WRITER_2007 when the XML of the excel sheet is being gnerated
New Methods SET_SIZE and GET_SIZE. New attributes: WIDHT, HEIGHT, DEFAULT_WIDTH, DEFAULT_HEIGHT The size of the comments will be read in class ZCL_EXCEL_WRITER_2007, method CREATE_XL_DRAWING_FOR_COMMENTS
Modified method CREATE_XL_DRAWING_FOR_COMMENTS to have the possibility to change the size of the comments
Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>
Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>
Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>
Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>
Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>
Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>
Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>
Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>
Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>
I've changed again the default width to 2. I've changed other numbers in the anchor string, and I think work better with width 2 by defautl. Sorry for these last changes.
Renaming attributes to better understanding
Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>
Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>
Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>
Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>
Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>
Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>
Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>
Mass update of styles already exist, see the class ZCL_EXCEL_STYLE_CHANGER and the demo program using it. |
Oh, thanks, didn't know that. I'll remove the PR. may be creating a new one with only the first part. |
Okay. Are you sure it's important to set a null style if you set the styles right after? Also, a Table Style is different from a Cell Style. |
Well, not important, it's just to have this option, may be in some scenarios we dont need any style in a table. I've made this change because I've tried to change the style of a cell and was not working. Probably I'm doing something wrong. What I did is modify the program ZDEMO_EXCEL10 adding these lines after the BIND_TABLE, to change the font color from white to black, and its not working.
The strange it's that if I use c_blue instead c_black, then its changing the font color: I thought there was some problem with table style and cell styles, so I've made this modification to not add any style to the table. I'll try with ZCL_EXCEL_STYLE_CHANGER. PS: Other thing I miss in method BIND_TABLE is the possibility to write the table without header. I know there is a method SET_TABLE, but is a simple method without all the features of BIND_TABLE method... |
Hello,
The method BIND_TABLE is great to write your data from an internal table to your excel sheet. But is always assigning a style to the table, like this:
Even if you leave this field empty is assigning a "default" style:
In method CREATE_XL_TABLE of class ZCL_EXCEL_WRITER_2007 is always adding this XML tag:
But sometimes I prefer to not set any style to my table and change some cells afterwards... and this possibility does not exist now.
So I've created a new constant: zcl_excel_table=>table_style_none to not add any style to the tables.
You can test it setting this constant in report ZDEMO_EXCEL10.
There is another thing I miss in ABAP2XLSX, and is change the style to a range of cells. Now I need to create several nested loops and change the style cell by cell. (Correct me if I'm wrong, I'm still learning how to use abap2xlsx)
So I've created a new method CHANGE_CELL_STYLE.
You can test it with the following demo program.
Ley me know if you like the changes.
Regards.