Html Codes within Excel File

Hello All

I want Trados Studio to split excel cell contents into segments based on embedded HTML codes

e.g:

<B>Product Features</B><BR>Throws are acrylic knitted<BR>Product size : 130x170 cm <BR>Product colour is beige. <BR><BR><B>Washing Recommendations</B><BR>Washable at 30 degrees.<BR>Do not bleach.<BR>Do not iron.

----------------------

Product Features
Throws are acrylic knitted
Product size : 130x170 cm
Product colour is beige. 
Washing Recommendations
Washable at 30 degrees.
Do not bleach.
Do not iron.

--------

this is a sample

sample-br.xlsx

thanks 

Parents
  • The default rules will handle this and should give you an idea of how to improve it if you wish:

    Trados Studio settings window with 'Embedded content' section highlighted, showing options for enabling embedded content processing and advanced settings.

    Paul Filkin | RWS

    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: Trados AI at 4:18 AM (GMT 0) on 5 Mar 2024]
  • Or you can use more distinctive approach by adding individual rules for the htmł element.

    This would be for example

    <b> </b> as tag pair with no extra segmentation hint, but with selected feature "Tag acts as word end" (is really VERY important when translating and should be selected by default, dear SDL)

    <br> as placeable with the segmentation hint "exclude"

    and so on...

    _________________________________________________________

    When asking for help here, please be as accurate as possible. Please always remember to give the exact version of product used and all possible error messages received. The better you describe your problem, the better help you will get.

    Want to learn more about Trados Studio? Visit the Community Hub. Have a good idea to make Trados Studio better? Publish it here.

  • I find this regex-based approach rather amateurish, cumbersome and most importantly failing big time with just a little bit more complex HTML code, not mentioning anything more complicated (containing entities, comments, inline scripts, etc.)

    Therefore I use a simple script which exports the HTML content to very simple XML structure like this

    <string cell="A1">blablabla, some complicated HTML code</string>

    This is then easily processed using the XML with HTML embedded content, with all comfort of embedded content parser.

    And then it's again very easily injected back into the appropriate places into the original Excel sheet using another  rather dumb script which only reads the cell location from the XML element attribute and puts the string in the cell.

    Not a method for average Joe Translator, I know...

  • Why not then simply save Excel as XML and process that in Studio? Not that complicated as it seems...

    _________________________________________________________

    When asking for help here, please be as accurate as possible. Please always remember to give the exact version of product used and all possible error messages received. The better you describe your problem, the better help you will get.

    Want to learn more about Trados Studio? Visit the Community Hub. Have a good idea to make Trados Studio better? Publish it here.

Reply Children