'How to extract data from xlsx file in Oracle Apex (data parser) using worksheet name rather than worksheet code name?

How can I extract or read data from xlsx file in Oracle apex data parser using the worksheet name instead of worksheet code:

In the sample code below, we can see that what is used is the file worksheet code name:

SELECT line_number,
   col001,
   col002,
   col003 FROM TABLE (apex_data_parser.parse (p_content           => (SELECT file_content
                                                            FROM loader_files
                                                           WHERE id = 1),
                                  p_file_name         => 'data.xlsx',
                                  **p_xlsx_sheet_name   => 'sheet1.xml',**
                                  p_skip_rows         => 0));

My requirement is to instead of using the code name "sheet1.xml" that I use the worksheet name "employees", the reason is that we need to extract data from multiple worksheets and the position of the worksheets might change, changing the worksheet code names and therefore breaking my code.

Is there anyway this can be done?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source