ExcelGen icon indicating copy to clipboard operation
ExcelGen copied to clipboard

Can we create a multi line dynamic headers for columns using Excel Gen

Open zaheer691 opened this issue 3 years ago • 2 comments

can we create multi line dynamic headers with filters for different columns in sheet or table in a sheet? if we can please share example otherwise I'll request for enhancement. thanks

zaheer691 avatar Jan 31 '23 08:01 zaheer691

Mart Cube, I show how to do it in https://lee-lindley.github.io/oracle/plsql/2022/11/27/ExcelGen_multirow_headers.html. It references another post on refactoring the process into a utility to assist with it. You don't have to use the utility as that second post shows a few different ways to do the same thing.

Once you have the multi-row column headers in an array of arrays, you can loop through them replacing text placeholders with dynamic values.

For example for if I have a token '__QTR__' in my column headers v_headers and I want to replace it with a formatted date string like "Q1_2023" held in a variable named v_qtr_dt_str, I can loop through the arrays doing v_headers(i)(j) := REPLACE(v_headers(i)(j), '__QTR__', v_qtr_dt_str);

Wish it was easier, but it is at least doable.

lee-lindley avatar Jan 31 '23 11:01 lee-lindley

Zaheer,

Does your requirement match Lee's example or do you mean something different? If you can, please attach a sample file to explain what you want to do.

Thanks.

mbleron avatar Jan 31 '23 13:01 mbleron