Excluding cells in Excel based on fill colour

I have a large Excel file with several worksheets where I am trying to exclude certain cells from translation. Here is part of a sheet (zoomed out to make the text illegible):

Zoomed out view of an Excel worksheet with cells color-coded for translation. Cells with no fill are for translation, yellow and green filled cells are not. Text is illegible due to zoom level.

The client has colour coded the sheets this way:
- Cells with no fill colour should be translated
- Cells with a fill colour (yellow or green) should not be translated

To complicate matters, individual words in the cells have different font colours which should be preserved in the target file.  

Excluding the yellow cells is not a problem since they occupy entire columns, but I am getting nowhere with the green ones.

Here is what I have done so far to try to exclude the green cells:

1. Using the "Exclusions by Color" setting in the Excel 2007-2016 File Type, only to find out that it is actually based on the font colour, which was not obvious at all.

2. Changing the cell formatting in Excel, more specifically the Locked and Hidden properties on the Protection tab, to no avail.

3. Created an Excel macro to change the "NumberFormat" of green cells from "General" to the Custom format ";;;" (three semicolons) since this has been recommended by certain translators. However, this only hides the cell contents in Excel and has no effect whatsoever in Trados.

I hope I am wrong, but I cannot find a way of excluding cells based on the fill colour where the font colour also varies inside individual cells. If I temporarily change the font colour for the green cells in the source file, in order to exclude those cells from translation (method 1 above), there is no rational way to restore those font colours in the target file afterwards since the restoration would have to be done on a word level.



Generated Image Alt-Text
[edited by: Trados AI at 7:48 PM (GMT 0) on 28 Feb 2024]
emoji
Parents
  • Former Member
    0 Former Member

    tested another workaround.. it works well.
    -
    at MS Excel, add Memos (or Comments) to all and every cells you wanted,
    You will see it at SDL Trados Studio clearly.
    But, at DSI you can discern it and the just above one - the target you Do Not want to translate.
    So, your the next step is quite clear.
    Use filter, find both of them, DoNotTranslate segments and just below comment segments,
    and copy Source to Target and Lock it out.
    Finally, at translated MS Excel file, kill all the comments you added.
    Right ?

  • Hi Krupa and thanks for your efforts! I have been bogged down with a huge project for over a week and haven't had time to look at this until tonight.

    I have thought along your lines with comments, but it is still not ideal for my use case. If I insert dummy comments in Excel in the green and yellow cells (which should not be translated) and extract comments into Trados, the comments end up as segments (DSI: COM+) after the actual cell content (DSI: C+). Now, my cells can contain up to around 10 sentences, meaning I will have 10 C+ segments above the relevant comment segment (COM+), which all have to be selected and locked manually, see screenshot below. Even using the Advanced Display Filter I cannot find a way to display only the comment segments + the related text segments that belong to the same cell.

    This means that in reality I will have to

    1. start at the beginning of the document in Trados,

    2. find each comment segment and the related text segments immediately above,

    3. select these segments as a group, right-click and select Lock Segments,

    4. repeat from step 2 above until end of document.

    That would work but it is quite a manual and time consuming solution.

    Screenshot of Trados Studio showing a list of segments with 'Nonsense-sentence' followed by numbers 1 to 10, each with a warning symbol, and a final segment labeled 'DUMMYCOMMENT' marked as a comment (COM+).

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 7:48 PM (GMT 0) on 28 Feb 2024]
Reply
  • Hi Krupa and thanks for your efforts! I have been bogged down with a huge project for over a week and haven't had time to look at this until tonight.

    I have thought along your lines with comments, but it is still not ideal for my use case. If I insert dummy comments in Excel in the green and yellow cells (which should not be translated) and extract comments into Trados, the comments end up as segments (DSI: COM+) after the actual cell content (DSI: C+). Now, my cells can contain up to around 10 sentences, meaning I will have 10 C+ segments above the relevant comment segment (COM+), which all have to be selected and locked manually, see screenshot below. Even using the Advanced Display Filter I cannot find a way to display only the comment segments + the related text segments that belong to the same cell.

    This means that in reality I will have to

    1. start at the beginning of the document in Trados,

    2. find each comment segment and the related text segments immediately above,

    3. select these segments as a group, right-click and select Lock Segments,

    4. repeat from step 2 above until end of document.

    That would work but it is quite a manual and time consuming solution.

    Screenshot of Trados Studio showing a list of segments with 'Nonsense-sentence' followed by numbers 1 to 10, each with a warning symbol, and a final segment labeled 'DUMMYCOMMENT' marked as a comment (COM+).

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 7:48 PM (GMT 0) on 28 Feb 2024]
Children
  • Former Member
    0 Former Member in reply to Magnus Eriksson

    ....everything should be done "automatically" so all you have to do is Click_Once_Nothing_Else.

    I have omitted this part, because i have never ever considered processsing it manually.

    It is done by computer programming language C# more specifically through SDL Trados Studio's PlugIn.

    ah.... I just remember the real reason why I have omitted "it"

    You are the version 2019 of SDL Trados Studio user. I am writing PlugIn codes only with version 2017. So, I gave up making fulll codes and did not tell you the details. And the 2nd reason is you do not interested in my comments, in my wild guess.