export attribute values included in sdlxliff files

Hello,

I have Trados Studio 2022 SR2 - 17.2.12.19268 and I would like to extract some pieces of information from an sdlxliff file which are nonetheless just visibile when opening that file in a plain editor, such as Notepad++: They are not visible in Trados but I can see them when reading that sdlxliff as an XML file in an editing app.

In particular, I would like to have an overview of all entries for, say, attribute "origin-system=", in order to know which translation memory were actually used to translate the sdlxliff file at stake.

I have tried to import such an sdlxliff file into Excel but with no success.

To sum up, I would like to have all sdlxliff file values related to attribute, say,  ""origin-system=" listed in one single spreadsheet or list.

emoji
Parents
  •  

    I don't know if the AI helped you as you left it marked as a verified answer, but just in case you want to persist with Excel I think you need to use Power Query, like this:

    • Data → Get Data → From File → From XML
      Browse to your renamed file.

    • Navigator dialog opens – you will usually see a single top‑level table (often called Table0 or xliff).
      Tick it and choose Transform Data (not Load yet).

    • Power Query Editor opens.
      You will see one or more columns of type Table or Record.
      For each such column:

      • Click the /expand icon in the column header.

      • Untick “Use original column name as prefix” (tidier).

      • Tick Select All Columns.

        • Attributes appear with an @ prefix (e.g. @id, @source-language) – keep them all.

      • Press OK.

    • Repeat the expand step as many times as necessary (XML is hierarchical, so you may have to drill down several levels until every column is plain text/number). Excel always retains attributes as columns, so nothing is lost.

    • When everything you need is laid out in tabular form, press Home → Close & Load.
      Power Query writes the results into a new worksheet.

    I got those instructions with AI, then tested them, and they are pretty good.  But it's a ridiculously labour intensive process, especially if you have lots of files.  So I asked the AI to find a quicker way with an Excel VB macro.  I liked it so much I put it here:

    https://github.com/paulfilkin/VB-scripts/tree/main/ExtractTranslationAttributes

    When you run it you are asked to select the sdlxliff, then it tells you how many translation units were imported and displays a nice clean solution specific to the translation like this:

    Screenshot of an Excel sheet displaying translation data with columns such as Trans-Unit ID, Source Text, Target Text, Segment ID, Status, Origin, and others. Rows are highlighted in alternating blue and white.

    I guess you could easily adapt it from this starting point if you needed to.

    I also think Python would probably be a better solution in the end, but I was interested to see how to get it into Excel.

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

    emoji


    Generated Image Alt-Text
    [edited by: RWS Community AI at 9:06 PM (GMT 1) on 23 Jul 2025]
Reply
  •  

    I don't know if the AI helped you as you left it marked as a verified answer, but just in case you want to persist with Excel I think you need to use Power Query, like this:

    • Data → Get Data → From File → From XML
      Browse to your renamed file.

    • Navigator dialog opens – you will usually see a single top‑level table (often called Table0 or xliff).
      Tick it and choose Transform Data (not Load yet).

    • Power Query Editor opens.
      You will see one or more columns of type Table or Record.
      For each such column:

      • Click the /expand icon in the column header.

      • Untick “Use original column name as prefix” (tidier).

      • Tick Select All Columns.

        • Attributes appear with an @ prefix (e.g. @id, @source-language) – keep them all.

      • Press OK.

    • Repeat the expand step as many times as necessary (XML is hierarchical, so you may have to drill down several levels until every column is plain text/number). Excel always retains attributes as columns, so nothing is lost.

    • When everything you need is laid out in tabular form, press Home → Close & Load.
      Power Query writes the results into a new worksheet.

    I got those instructions with AI, then tested them, and they are pretty good.  But it's a ridiculously labour intensive process, especially if you have lots of files.  So I asked the AI to find a quicker way with an Excel VB macro.  I liked it so much I put it here:

    https://github.com/paulfilkin/VB-scripts/tree/main/ExtractTranslationAttributes

    When you run it you are asked to select the sdlxliff, then it tells you how many translation units were imported and displays a nice clean solution specific to the translation like this:

    Screenshot of an Excel sheet displaying translation data with columns such as Trans-Unit ID, Source Text, Target Text, Segment ID, Status, Origin, and others. Rows are highlighted in alternating blue and white.

    I guess you could easily adapt it from this starting point if you needed to.

    I also think Python would probably be a better solution in the end, but I was interested to see how to get it into Excel.

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

    emoji


    Generated Image Alt-Text
    [edited by: RWS Community AI at 9:06 PM (GMT 1) on 23 Jul 2025]
Children
  •   

    In fact I realised how much this was missing and now I started it I had to make it somewhat more comprehensive.  So the new version - same link - will capture a lot more:

    Column Description
    Trans-Unit ID Unique identifier for each translation unit
    Source Text Original source language text
    Target Text Translated target language text
    Segment ID Segment identifier within the translation unit
    Status Translation status (conf attribute value)
    Confirmation Level Human-readable status (Draft, Translated, Approved, etc.)
    Origin Where the translation came from
    Origin System System that provided the translation (e.g., TM name)
    Percent Match Translation memory match percentage
    Text Match Whether text matching was used
    Struct Match Whether structural matching was used
    Context Match Context match percentage
    Created Date When the translation was created
    Created By User who created the translation
    Modified Date When the translation was last modified
    Modified By User who last modified the translation
    Comment Text Review comment text (if any)
    Comment Author Who wrote the comment
    Comment Date When the comment was added
    Comment Severity Comment priority (Low, Medium, High)
    Has Track Changes Whether segment has revisions (Yes/No)
    Revision Author Who made the revision
    Revision Date When the revision was made
    Deleted Text Text that was deleted
    Added Text Text that was added
    Locked Whether segment is locked

    .

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

    emoji