Skip to content
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

Set the Worksheet Tab Color #177

Closed
ivanfemia opened this issue Dec 27, 2013 · 8 comments
Closed

Set the Worksheet Tab Color #177

ivanfemia opened this issue Dec 27, 2013 · 8 comments
Milestone

Comments

@ivanfemia
Copy link
Collaborator

In Excel you have the possibility to set the worksheet tab color. This is often useful for showing related data or differentiate between sheets containing unrelated information.

@ivanfemia
Copy link
Collaborator Author

Updating issues (#174, #31, #71, #134, #137, #141, #155, #156, #170, #176, #179, #180, #182)

@ivanfemia
Copy link
Collaborator Author

added functionality requested.
Can be tested with the following coding:

REPORT.
DATA: lo_excel                TYPE REF TO zcl_excel,
      lo_worksheet            TYPE REF TO zcl_excel_worksheet.
DATA: lv_tabcolor TYPE zexcel_s_tabcolor.
CONSTANTS: gc_save_file_name TYPE string VALUE 'colored_tabs.xlsx'.
INCLUDE zdemo_excel_outputopt_incl.
START-OF-SELECTION.
  " Creates active sheet
  CREATE OBJECT lo_excel.
  " Get active sheet
  lo_worksheet = lo_excel->get_active_worksheet( ).
  lv_tabcolor-rgb = zcl_excel_style_color=>create_new_argb( ip_red   = '00'
                                                            ip_green = 'C0'
                                                            ip_blu   = 'C0' ).
  lo_worksheet->set_tabcolor( lv_tabcolor ).
  lo_worksheet = lo_excel->add_new_worksheet( ).
  lv_tabcolor-rgb = zcl_excel_style_color=>create_new_argb( ip_red   = 'C0'
                                                            ip_green = '00'
                                                            ip_blu   = 'C0' ).
  lo_worksheet->set_tabcolor( lv_tabcolor ).
*** Create output
  lcl_output=>output( lo_excel ).

@ivanfemia
Copy link
Collaborator Author

I think it would be the best to add this coding to the Demo Report that demonstrates multiple worksheets.

@ivanfemia
Copy link
Collaborator Author

Thank you for implementing this feature!!!!!
I would like to test it but getting errors during the nugget import.

Is it possible to get the current nugg-file without the webdynpro objects. SAPlink runs in an error while importing the webdynpro component/interface/sicf objects. So the import stops in the middle with missing objects. Everything after the ZIWCI_DEMO_EXCEL_WDA01is not installed.

Thanks a lot
Kilian

@ivanfemia
Copy link
Collaborator Author

Dear Kilian,

please make sure that you update SAPlink to the latest available daily build. That should avoid the import problem. Also update the SAPlink plug-ins to the latest daily build. It's easy now because most of them are coming in a single nugget.

Best regards
Gregor

@ivanfemia
Copy link
Collaborator Author

I encountered the same problem when installing from the working directory.
I issued an issue #26 into project ZAKE because of this but I guess something alike should be done for ZSAPLINK if you install a complete nugget


live long and prosper
Stefan Schmöcker

@ivanfemia
Copy link
Collaborator Author

I have now installed the latest version of ZSAPLINK together with ZA2X stable version 7 and could also use the function successfully.
Thank you very much for implementing this feature - it works like a charm!!!!

Best regards
Kilian

@ivanfemia
Copy link
Collaborator Author

[[image:cyMaEYdcKr473dacwqjQYw]]
different worksheet tab colors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant