Skip to Main Content

Cloud Platform

Match and replace condition in Excel Template

Mohan MuraliMar 20 2020

     Hi Team,

I am working on an Excel template for report output.

I have the data in XML below:

<?xml version = '1.0' encoding = 'utf-8'?>

<!--Generated by Oracle BI Publisher -Dataengine, datamodel:__Gaurav_Gupta_TEST_DM_xdm -->

<DATA_DS>

<G_1>

<USERNAME>10000074</USERNAME><FIRST_NAME>Kerri</FIRST_NAME><LAST_NAME>Harris</LAST_NAME><PERSON_NUMBER>10000074</PERSON_NUMBER><LAST_UPDATED_BY>REQUESTS</LAST_UPDATED_BY><LAST_UPDATE_DATE>23-02-2020</LAST_UPDATE_DATE><ROLENAME>MTA - Line Manager Data Role; MTA-BN12-ADMINISTRATOR-ALL; MTA-BN12-MANAGER-ALL; MTA-BN12-SPECIALIST-ALL; MTA-HR12-ANALYST-ALL; MTA-HR12-MANAGER-ALL; MTA-HR12-SPECIALIST-ALL; MTA-PR12-MANAGER-ALL; Application Administrator</ROLENAME>

</G_1>

</DATA_DS>

In the <ROLENAME> contains multiple values with ";" as a separator.

I am trying to use the below condition to replace "X" for the match case, however it only comparing the 1st value from the string, not others.

Below are the 3 different conditon for 3 different cells in the excel.

1. <xsl:if test="ROLENAME = 'MTA - Line Manager Data Role'">X</xsl:if>

2.<xsl:if test="ROLENAME = 'MTA - Line Manager Data Role'">X</xsl:if>

3. <xsl:if test="ROLENAME = 'Executive Manager'">X</xsl:if>

Please advise me on the right code which can check all value from the string.

Regards,

Murali

Comments
Post Details
Added on Mar 20 2020
0 comments
98 views