How to map a complex XML message onto a flattened XSD for multi line insert

Hi Experts.
I have a webservice in my composite that takes an xml message that contains repeating complex type elements. The XSD is as follows:
<?xml version= '1.0' encoding= 'UTF-8' ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:XxInt003Stg="http://www.somewhere.co.uk/xxx/integration/int003Stage"
targetNamespace="http://www.somewhere.co.uk/xxx/integration/int003Stage" elementFormDefault="qualified">
<xsd:complexType name="InterfaceFileType">
<xsd:sequence>
<xsd:element name="FileName" type="xsd:string"/>
<xsd:element name="FileSource" type="xsd:string"/>
<xsd:element name="FileIdentifier" type="xsd:integer"/>
<xsd:element name="InterfaceInvoices" type="XxInt003Stg:InterfaceInvoicesType"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="InterfaceInvoicesType">
<xsd:sequence>
<xsd:element name="InterfaceInvoice" type="XxInt003Stg:InterfaceInvoiceType"
maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="InterfaceInvoiceType">
<xsd:sequence>
<xsd:element name="SupplierNumber" type="xsd:string"/>
<xsd:element name="SupplierSite" type="xsd:string"/>
<xsd:element name="InvoiceNumber" type="xsd:string"/>
<xsd:element name="InterfaceInvoiceLines">
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="XxInt003Stg:InterfaceInvoiceLinesType">
<xsd:sequence>
<xsd:element name="InterfaceInvoiceLine"
type="XxInt003Stg:InterfaceInvoiceLineType"
maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="InterfaceInvoiceLinesType"/>
<xsd:complexType name="InterfaceInvoiceLineType">
<xsd:sequence>
<xsd:element name="LineAmount" type="xsd:decimal" nillable="false"/>
<xsd:element name="TaxAmount" type="xsd:decimal"/>
<xsd:element name="BusinessEntityReference" type="xsd:string"/>
<xsd:element name="AccountNumber" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="InterfacePayload">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="InterfaceFiles" type="XxInt003Stg:InterfaceFileType"
maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
When I try to push this through the database adapter after mapping the fields it inserts multiple rows but they are all the same values. I have put a for-each XSLT construct based on the lowest element in the XSD (Invoice Line) and allocated that at various places on the target tree structure but with no success.
The XSLT is as follows:
<xsl:template match="/">
<top:XxInt003InterfaceInvoiceStgCollection>
<top:XxInt003InterfaceInvoiceStg>
<top:fileName>
<xsl:value-of select="/inp1:InterfacePayload/inp1:InterfaceFiles/inp1:FileName"/>
</top:fileName>
<top:fileSource>
<xsl:value-of select="/inp1:InterfacePayload/inp1:InterfaceFiles/inp1:FileSource"/>
</top:fileSource>
<top:fileIdentifier>
<xsl:value-of select="/inp1:InterfacePayload/inp1:InterfaceFiles/inp1:FileIdentifier"/>
</top:fileIdentifier>
<top:supplierNumber>
<xsl:value-of select="/inp1:InterfacePayload/inp1:InterfaceFiles/inp1:InterfaceInvoices/inp1:InterfaceInvoice/inp1:SupplierNumber"/>
</top:supplierNumber>
<top:supplierSite>
<xsl:value-of select="/inp1:InterfacePayload/inp1:InterfaceFiles/inp1:InterfaceInvoices/inp1:InterfaceInvoice/inp1:SupplierSite"/>
</top:supplierSite>
<top:invoiceNumber>
<xsl:value-of select="/inp1:InterfacePayload/inp1:InterfaceFiles/inp1:InterfaceInvoices/inp1:InterfaceInvoice/inp1:InvoiceNumber"/>
</top:invoiceNumber>
<xsl:for-each select="/inp1:InterfacePayload/inp1:InterfaceFiles/inp1:InterfaceInvoices/inp1:InterfaceInvoice/inp1:InterfaceInvoiceLines/inp1:InterfaceInvoiceLine">
<top:lineAmount>
<xsl:value-of select="/inp1:InterfacePayload/inp1:InterfaceFiles/inp1:InterfaceInvoices/inp1:InterfaceInvoice/inp1:InterfaceInvoiceLines/inp1:InterfaceInvoiceLine/inp1:LineAmount"/>
</top:lineAmount>
</xsl:for-each>
<top:taxAmount>
<xsl:value-of select="/inp1:InterfacePayload/inp1:InterfaceFiles/inp1:InterfaceInvoices/inp1:InterfaceInvoice/inp1:InterfaceInvoiceLines/inp1:InterfaceInvoiceLine/inp1:TaxAmount"/>
</top:taxAmount>
<top:businessEntityReference>
<xsl:value-of select="/inp1:InterfacePayload/inp1:InterfaceFiles/inp1:InterfaceInvoices/inp1:InterfaceInvoice/inp1:InterfaceInvoiceLines/inp1:InterfaceInvoiceLine/inp1:BusinessEntityReference"/>
</top:businessEntityReference>
<top:accountNumber>
<xsl:value-of select="/inp1:InterfacePayload/inp1:InterfaceFiles/inp1:InterfaceInvoices/inp1:InterfaceInvoice/inp1:InterfaceInvoiceLines/inp1:InterfaceInvoiceLine/inp1:AccountNumber"/>
</top:accountNumber>
</top:XxInt003InterfaceInvoiceStg>
</top:XxInt003InterfaceInvoiceStgCollection>
</xsl:template>
I am sure this is just something fundemantal I am doing, is it something to do with the inp1 bit of the XSLT? I get the feeling this should be looping somehow?
Thanks
Keith

Hi,
as I understand you try to transform 'InterfacePayload' (your XSD - just easier to read here)
InterfacePayload (1:1)
-- InterfaceFiles (1:N)
---- FileName (1:1)
---- FileSource (1:1)
---- FileIdentifier (1:1)
---- InterfaceInvoices (1:1)
------ InterfaceInvoice (1:N)
-------- SupplierNumber (1:1)
-------- SupplierSite (1:1)
-------- InvoiceNumber (1:1)
-------- InterfaceInvoiceLines (1:1)
---------- InterfaceInvoiceLine (1:N)
------------ LineAmount (1:1)
------------ TaxAmount (1:1)
------------ BusinessEntityReference (1:1)
------------ AccountNumber (1:1)
to 'XxInt003InterfaceInvoiceStgCollection' (extracted from your XSLT)
XxInt003InterfaceInvoiceStgCollection (1:1)
-- XxInt003InterfaceInvoiceStg (1:1)
---- fileName (1:1)
---- fileSource (1:1)
---- fileIdentifier (1:1)
---- supplierNumber (1:1)
---- supplierSite (1:1)
---- invoiceNumber (1:1)
---- lineAmount (1:N)
---- taxAmount (1:1)
---- businessEntityReference (1:1)
---- accountNumber (1:1)
In the 'xsl:for-each' construct
+<xsl:for-each select="/inp1:InterfacePayload/inp1:InterfaceFiles/inp1:InterfaceInvoices/inp1:InterfaceInvoice/inp1:InterfaceInvoiceLines/inp1:InterfaceInvoiceLine">+
+<top:lineAmount>+
+<xsl:value-of select="/inp1:InterfacePayload/inp1:InterfaceFiles/inp1:InterfaceInvoices/inp1:InterfaceInvoice/inp1:InterfaceInvoiceLines/inp1:InterfaceInvoiceLine/inp1:LineAmount" />+
+</top:lineAmount>+
+</xsl:for-each>+
- you are asking to iterate through all available 'inp1:InterfaceInvoiceLine' elements in the input XML document
- the value of the element 'top:lineAmount' (for each iteration) is being calculated as all values of available 'inp1:LineAmount' elements in the input XML document together
So, if you have ... lets say
- 4x 'inp1:InterfaceInvoiceLine' element in the input XML document, each containing one 'inp1:LineAmount' element ... with values {1, 2, 3, 4} respectively
- the output will be something like this
<top:lineAmount>1234</top:lineAmount>
<top:lineAmount>1234</top:lineAmount>
<top:lineAmount>1234</top:lineAmount>
<top:lineAmount>1234</top:lineAmount>
Why are you always querying from +/inp1:InterfacePayload/inp1:InterfaceFiles/...+ ?
I think ... all Xpath queries in your XSLT are wrong (they query something else than you think).
e.g.
- putting all file names together into one element (+/inp1:InterfacePayload/inp1:InterfaceFiles/inp1:FileName+)
- putting all file sources together into one element (+/inp1:InterfacePayload/inp1:InterfaceFiles/inp1:FileSource+)
- putting all invoice numbers together into one element (+/inp1:InterfacePayload/inp1:InterfaceFiles/inp1:InterfaceInvoices/inp1:InterfaceInvoice/inp1:InvoiceNumber+)
Best regards,
Martin.

Similar Messages

  • How do i transfer documents from the cloud to the iPad for off line reading.?.

    How can I transfer documents from the cloud to my iPad for off line reading.?

    If you're using the mobile reader, you can use the technique mentioned in this infographic titled How to work with files on the go using Adobe Reader for mobile. Or, now you can access Acrobat.com from the iPad just using a browser as mentioned in this blog Acrobat.com on iOS is a beautiful thing.

  • How to HTTP-Post different XML messages to one receiving URL on XI side?

    Hi
    I have a problem with a HTTP => XI => IDoc scenario.
    A client want to send 4 different XML documents to only 1 receiving URL on the XI side. How can I handle this in XI???
    To send XML data via HTTP to XI you have to specify the namespace, interface and service in the URL. But I only can specify 1 namespace, interface and namespace in the URL...
    But how can I define a generic message interface for all 4 messages.
    The solution with 4 receiving URL's is easy, but not workable for the client
    Thx
    manuku

    You can do following:
    Create an interface with an artificial root node like this:
    root
      - structure message 1
      - structure message 2
      - structure message 3
    A simple XSLT/Java mapping adds that root node to every message.
    Create different mappings based on the structure if the different mappings and do routing based on the same.
    Another option: Upgrade to PI 7.1. Here you can simply create a service interface with different operations and routing/mapping based on the operations.
    Regards
    Stefan

  • How to store and retrieve XML messages in AQ using ESB/ BPE

    Hello,
    I am having a requirement which I feel should be fairly common - store and retrieve XML messages in AQ. However, I am struggling to decide which type of queue to use AQ or JMS...Here is the requirement
    1. In an ESB, I want to read different kind of files using file adapter. Different kind as in, having different structure or schema
    2. I want to create a queue that is capable of storing any kind of xml data. To this queue, I want to enqueue the message read in step 1.
    3. In another process, say a BPEL, I want to dequeue the message and write into a file. The filename is retrieved from one of the header properties. I want to dequeue using a stored procedure, not by using a JMS or AQ Adapter (reason being that these adapters poll the queue, and consume a message immediately. However, I want to consume the message only when there is a business need)
    My questions are:
    1. What kind of queue I should create in the DB (What should be its payload type...XMLType? )... I guess the answer would also determine the adapter to be used - JMS or AQ
    2. How I should map the xml data read from the file in step 1 to this adapter
    Any help is highly appreciated.

    You are right in suggesting that I dont need to store my XML data as xml in the DB...I dont want to too :) but its just that, thats the only option I can see at this time (the other track i am exploring is :
    File adapter(XML) -&gt; Convert to opaque (base64binary) -&gt; Enqueue opaque to JMS (aq$_jms_bytes_message) -&gt;Dequeue Opaque -&gt; Write file opaquely.
    In this I have hit the roadblock in trying to convert XML to base64binary...maybe some custom java function is needed...anyway)
    Coming back to this thread, where I am trying the following
    File adapter(XML)  -&gt; Enqueue as XML to queue  -&gt;Dequeue XML -&gt; Write file opaquely.
    PS: I think its important for me to mention that I am using SOA 10.1.3.1.0
    I tried the steps you gave...after creating the queue, I am trying to create a JMS adapter. But the queue I created doesnt show up in the browse window of destinations for the JMS Adapter..That had led me to infer that JMS adapter cant be used
    {color:#99cc00}CREATE OR REPLACE TYPE batchupdate_row_type AS OBJECT
    (update_queue_id NUMBER
    ,upc VARCHAR2(20)
    ,price1 NUMBER);
    {color}
    {color:#99cc00}CREATE OR REPLACE TYPE batchupdate_rec_type AS VARRAY(9999999) OF batchupdate_row_type;
    CREATE OR REPLACE TYPE payload_type AS OBJECT ( payload batchupdate_rec_type);
    EXECUTE DBMS_AQADM.CREATE_QUEUE_TABLE ( queue_table =&gt; 'jmsuser.batch_update_queue_table', queue_payload_type =&gt; 'payload_type');
    EXECUTE DBMS_AQADM.CREATE_QUEUE ( queue_name =&gt; 'batch_update_queue', queue_table =&gt; 'jmsuser.batch_update_queue_table');
    EXECUTE DBMS_AQADM.START_QUEUE ( queue_name =&gt; 'batch_update_queue'); {color}
    I also needed some opinion on whether the last step of my proposed solution ( Dequeue XML -&gt; Write file opaquely) is possible. As I want to develop a service oblivious of the structure of the file, I dont want to create a file adapter based on a particular xsd...so I want to write whatever xml I am getting from the queue....is this step possible

  • How to map array to XML

    Hi
         i am making a Advance data grid with hierarichal data source.its working fine but now i need to use xml instead of that array.i tried alot but can not manage to conver that array to xml.so please convert that so that i can use that in my advance data grid without much change in code.
    private var masterData:Array = [
    {  TableName:"RatingDeductible",
    children:[
    {CompanyKey:1,  StateCode:"ALL", LOBKey:1, ExpiryDate:2010-12-12,  PerClaimALAEWithinLimitFactor:1.000,  PerClaimALAEOutsideLimitFactor:1.100,AggregateALAEWithinLimitFactor:1.050,AggregateALAEOu tsideLimitFactor:1.150,Deductible:1000,IdentifierKey:1},
    {CompanyKey:1,  StateCode:"ALL", LOBKey:1, ExpiryDate:2010-12-12,  PerClaimALAEWithinLimitFactor:1.000,  PerClaimALAEOutsideLimitFactor:1.100,AggregateALAEWithinLimitFactor:1.050,AggregateALAEOu tsideLimitFactor:1.150,Deductible:1000,IdentifierKey:1},
    {CompanyKey:1,  StateCode:"ALL", LOBKey:1, ExpiryDate:2010-12-12,  PerClaimALAEWithinLimitFactor:1.000,  PerClaimALAEOutsideLimitFactor:1.100,AggregateALAEWithinLimitFactor:1.050,AggregateALAEOu tsideLimitFactor:1.150,Deductible:1000,IdentifierKey:1},
    Waiting fo reply
    Thanks and Regards
      Vineet Osho

    I do not think this is a complex XML structure. All that you need to take care is about the contexts. How ever it is not possible to give u the complete mapping here. If you have tried mapping already and facing some issues.. please put it here.. so that some one can help you.
    VJ

  • How to map a deep xml structure to flat structure

    Hi, I'm trying to map a deep xml structure to a flat file structure. See this:
    <SalesPoint>
             <header>
                  <idTx></idTx>
                  <opCode></opCode>
             </header>
             <body>
              <DataSet>
                   <codOperacion></codOperacion>
                   <codCanalDeVenta></codCanalDeVenta>
                   <cuitDeposito>
                   <docMinorista>
                   <fechaOperacion>
                   <codCC>
                   <Details>
                         <Dato>
                                        <nroSerieEquipo></nroSerieEquipo>
                            <codNMU></codNMU>
                            <codOrigenEquipo></codOrigenEquipo>
                            <codConcepto></codConcepto>
                             <codSegmento></codSegmento>
                            <motivoSiniestro></motivoSiniestro>
                         </Dato>
                   </Details>
              </DataSet>
             </body>
    </SalesPoint>
    to:
    <SalesPoint>
            <idTx></idTx>
            <opCode></opCode>
         <codOperacion></codOperacion>
         <codCanalDeVenta></codCanalDeVenta>
         <cuitDeposito></cuitDeposito>
         <docMinorista></docMinorista>
         <fechaOperacion></fechaOperacion>
         <codCC></codCC>
            <nroSerieEquipo></nroSerieEquipo>
            <codNMU></codNMU>
         <codOrigenEquipo></codOrigenEquipo>
         <codConcepto></codConcepto>
         <codSegmento></codSegmento>
         <motivoSiniestro></motivoSiniestro>
    </SalesPoint>
    Thanks in advance!!!!

    I do not think this is a complex XML structure. All that you need to take care is about the contexts. How ever it is not possible to give u the complete mapping here. If you have tried mapping already and facing some issues.. please put it here.. so that some one can help you.
    VJ

  • Testcase, how to split up an xml message and call a BPEL process.

    Another question.
    Considering the following XML message.
    <?xml version="1.0" encoding="UTF-8"?>
    <rows>
    <row>
    <id>10</id>
    <naam>A</naam>
    </row>
    <row>
    <id>20</id>
    <naam>B</naam>
    </row>
    </rows>
    An input message can consist of 1 to about 20000 <row></row> elements. I would like to split up this message into individual <row></row> and call a BPEL process for further processing.
    I've tried to use the file adapters feature "Files contain Multiple Messages" Publish Messages in batches of.." This did not work. ( root element expected exceptions ).
    I've also tried to invoke an extra async routing service with a mapping which removes the root element. This also doesn't work as it leaves the following ( incorrect ) xml message at the end.
    <row>
    <id>10</id>
    <naam>A</naam>
    </row>
    <row>
    <id>20</id>
    <naam>B</naam>
    </row>
    Which is logical considering how an XSL transformation works.
    Is there any way to achieve this?
    Any help is appreciated!

    You shoul create a while loop, that loops through XML payload for each row. Than you can process each individual row. See also example:
    C:\orabpel\samples\tutorials\112.Arrays\ArraySample.bpel

  • How do I put all my messages onto my Macbook to view them on there.

    I have a lot of messages saved onto my iPhone 5 and I want to view a certain contact's messages (like scroll all the way to the top) but it takes a long time to do so since I have sent/recieved so many messages from them and I have them all saved, so I would like to somehow get all those messages onto my Macbook Pro to make it easier to view them. So if anyone knows how I could do this please help! (and no this is not be asking how to get my iMessage on my macbook) hopefully my question makes sense....

    See if this helps.
    https://discussions.apple.com/thread/2787937

  • HOW TO MAP IDOC TO XML

    Hi,
      I need to map IDOC to xml but the problem is I have 400 fields in IDOC which  are to be mapped to 20 elements in XML.
          As it a tedious process to go to 400 fields for each xml element.Is their any better way to find correct field in IDOC with very minial time rather going 400 fields for each xml element.
    thanks
    sreeram

    hi,
    >>1)Even SAP it self does not encourage to use ABAP >>MAPPING and
    i dont know where you have read this, but ABAP mapping is one of the most popular/ most efficient and highly recomended by SAP. I have used it in tons of places.
    >>2)More over Iam not ABAP resource.
    you could also do a java mapping.
    there is no other easy way if you are not doing abap/java mapping. you are then left with the only option of using the graphical editor.
    cheers,
    Naveen
    Message was edited by: Naveen Pandrangi

  • How to loop through many XML messages and parse them ?

    Hi All
    I have been trying very hard to loop through many XML messages and process each of them. Let me first explain the problem -
    Suppose I have the following String -
    <xyz>
    <abc>happy</abc>
    </xyz>
    <xyz>
    <abc>new</abc>
    <xyz>
    <xyz>
    <abc>year</abc>
    </xyz>
    I have to process each message within the <xyz></xyz> tag and find the falue of <abc> element (happy, new and year).
    The extraction of <abc> value is very simple, I am using SAX parser's startElement() method to check every element's name and if the element's name is <abc> pick up the value. But I am not able to loop through the different messages within the <xyz></xyz> tag.
    I am thinking of using another DOM parser -
    DOMParser domParser = new DOMParser();
    StringReader rdr = new StringReader(inputXML);
    InputSource src = new InputSource(rdr);
    domParser.parse(src);
    Document doc = domParser.getDocument();
    NodeList nodeList = doc.getElementsByTagName("xyz");
    Now I can loop through this nodeList, but not able to. Is using the DOM parser and NodeList the preferable way of lopping through the messages, then how I can loop through ? Or is there any other way ?
    I have been trying on this for quite a few days, but not able to. Can you please help me out ?
    Thanking you in advance ....
    Nirmalya Sinha

    Hi,
    Try using the SAX reader from the dom4j package. The document object that you receive contains methods for getting the root elements and with that you can traverse down to the sub elements of it.
    Hope this was of some help.

  • How can I print/ upload Text messages onto my computer to print?

    Ive been harassed by my ex-boyfriend and i need to print out the text messages hes been sending me for court, can someone explain to me how i can do this?

        I understand the need for printing out important messages lea17. Do you have the messages saved? If they are still stored on your handset, I recommend forwarding them to an e-mail address. This is the best option for printing.
    JonathanK_VZW
    VZWSupport
    Follow Us on Twitter@VZWSupport

  • How do you get an xml file from the PO Output for Communication report?

    Can anyone tell me how you've created an xml output fil for this program? When I run it, the View XML button doesn't light up, and the output file is empty.
    I can see the XML when I click the View Log button, but can't figure out how to save it so that the XMLP Desktop tool can load it properly.
    If you can tell me how to create this file, I'd be very appreciative.

    Hi,
    I can't see the xml in my log file. Maybe you have a different logging level. One issue I have had before is that the xml declaration had a strange character encoding. It should say something like: <?xml version="1.0" ?>. If it mentions anything about encoding you can remove it.
    One of our developers wrote a custom process to write the xml to a table when the document was generated as we couldn't find any other way of doing it.
    You can use the sample xml available from the data definition but this is missing fields.
    Probably not much help...
    Paul

  • How to map secondry elements with main if have same ids for both?

    I need to map secondry elements with its matching primary elements if they both have same id.
    How can this be achieved in xslt.
    If ids are not matching then not a single element of secondry sholud be shown.
    If ids matching, then other fields of secondry elements, should be mapped to similar fields of primary elements.
    Eg: Its like some program running and in between some add on programs started (may be trailor or advertisement).
    the add on program is not always shown (optional), and whenever shown it has its own data information etc etc.
    Please provide me some input, how to map and proceed.
    Not sure what this code is really doing.
    <xsl:template match="SECONDARY_EVENT_LIST">
              <xsl:variable name="secondaryElements" select="ancestor::SCHEDULE/SECONDARY_ELEMENT_LIST"/>
              <xsl:for-each select="SCHEDULE_ELEMENT_ID">
                   <xsl:variable name="id" select="."/>
                   <xsl:apply-templates select="$secondaryElements/SCHEDULE_ELEMENT[(@ID=$id)]"/>
              </xsl:for-each>
         </xsl:template>
    Is this having any relation with what my requirement is all about?

    Hi,
    You can use XPATH command to get the exact tag.
    You can access each tag with it location like “/Report_Name/Group_Tag/Element_ID”.
    I think this will remove the ambiguity of Tags with same ID.

  • How can you change the leading in a fillable forms in the multi-line setting?

    I am creating multiple pdf files with check boxes, single text boxes and multi-line. On the form, I have multiple lines where the person will be able to type a description but I can't figure out how to change the leading so that when they do the fillable part, the copy will sit on the printed lines. Does anyone know how to do this, besides with the Typewriter tool, because that tool makes the rest of the document's fillable boxes unusable.

    Try making a new PDF from a blank page and add a couple of text fields. Save and reopen. You'll get a purple box at the top of the page that says there are form fields to be filled. If anyone needs more help they are in trouble. Again if you must have the lines you need to do some experiments with a text box and see what the leading is in Acrobat for the size of the text you are inputting and then adjust your lines to match, not the other way around. You have no control over the leading, just the font size.

  • How to automatically build a table with 2 alternated font colors for the lines ?

    Hi,
    I'm looking for a way to automatically build a table with alternate background color and alternate font color for the lines.
    I have this particular project (a list of companies of an industrial area) and it is updated twice a year :
    I managed to set an automated alternate background color of the lines so this works well (white/blue/white/blue...)
    But the font color does not automatically alternates... and I do not know how to set this up...
    All the companies are ordered alphabetically so when I have to insert or delete one, the whole text of the table under the modified line is messed up. Then I have unreadable white text on white background and blue text on blue background...
    Does anyone have an idea on how to automatically alternate the font color ?
    Thank you.
    Best regards,
    G.

    Hi,
    I know this [JS] code is awful but it works. If  someone wants to correct it …! 
    At the beginning, you have an Excel file. You play a little with it [doing concatenations] to get, after importing it in ID:
    Then, just run the .jsx:
    Done! 

Maybe you are looking for