Convert Transit's MARTIF to Excel, tab-del or CSV?
Thread poster: Hans Lenting
Hans Lenting
Hans Lenting
Netherlands
Member (2006)
German to Dutch
Aug 26, 2023

How to convert Transit's MARTIF to Excel, tab-del or CSV, without using TermStar?

Screen Shot 2023-08-26 at 10.51.37


 
wotswot
wotswot  Identity Verified
France
Local time: 20:58
Member (2011)
French to English
MTF to Excel Aug 26, 2023

Hi Hans, the only way I know is to write a custom program that functionally does the same as Termstar's export option but without all the unnecessary information. It all depends on the structure of your dictionary and on what fields you want to retrieve for each dictionary "record" (i.e. (between termEntry id='x' and /termEntry in the MTF).
I've written one for my main Termstar dictionary (FR > EN) in Excel VBA, which reads the MTF and writes to an Excel worksheet with one row per Termstar
... See more
Hi Hans, the only way I know is to write a custom program that functionally does the same as Termstar's export option but without all the unnecessary information. It all depends on the structure of your dictionary and on what fields you want to retrieve for each dictionary "record" (i.e. (between termEntry id='x' and /termEntry in the MTF).
I've written one for my main Termstar dictionary (FR > EN) in Excel VBA, which reads the MTF and writes to an Excel worksheet with one row per Termstar "record" and 1 to n columns for each SL and TL term. Each of the latter is one Excel cell, which in addition to the term itself also includes the term's Remark field (if not empty) and its last modified date.
If you are familiar with VBA, in your Excel VBA project make sure to add a reference to Microsoft ActiveX Data Objects 2.x (x being the latest version on your computer); this ensures correct UTF-8 processing in Excel. In your code, create a stream object before looping through the MTF and read the MTF into the stream object you've created. For each MTF record, add a row in your Excel worksheet, and write each field you want to export to a column on that row.

Let me know if you need any help. I could write a custom program for you if you can provide a small MTF that includes at least one record with all the fields you want to export from it.

Richard

[Edited at 2023-08-26 10:50 GMT]

[Edited at 2023-08-26 10:52 GMT]
Collapse


 
Hans Lenting
Hans Lenting
Netherlands
Member (2006)
German to Dutch
TOPIC STARTER
Thank you Aug 26, 2023

Hello Richard,

Thank you for your generous offer!

For now, I have solved the task by deleting all lines that don't contain either the source term or the target term (since these are the only data that I need). After that, I separated them with a tab character via a simple find and replace action.

Cheers,

Hans


 
Gary Hess
Gary Hess  Identity Verified
Local time: 20:58
German to English
+ ...
Xbench Oct 19, 2023

Hi Hans,

I think that Xbench will do what you want to do. See these links:

- Import Martif: https://docs.xbench.net/online-help/dialogs/add-files-to-project/file-type/
- Export item
... See more
Hi Hans,

I think that Xbench will do what you want to do. See these links:

- Import Martif: https://docs.xbench.net/online-help/dialogs/add-files-to-project/file-type/
- Export items: https://docs.xbench.net/user-guide/export-items/#body-inner

It's a nice tool and a free trial is probably still available.

Gary
Collapse


Hans Lenting
 
Hans Lenting
Hans Lenting
Netherlands
Member (2006)
German to Dutch
TOPIC STARTER
That worked Oct 21, 2023

Gary Hess wrote:

Hi Hans,

I think that Xbench will do what you want to do. See these links:

- Import Martif: https://docs.xbench.net/online-help/dialogs/add-files-to-project/file-type/
- Export items: https://docs.xbench.net/user-guide/export-items/#body-inner

It's a nice tool and a free trial is probably still available.

Gary


Thank you, Gary, that worked!


 


To report site rules violations or get help, contact a site moderator:

Moderator(s) of this forum
Maya Gorgoshidze[Call to this topic]

You can also contact site staff by submitting a support request »

Convert Transit's MARTIF to Excel, tab-del or CSV?






Trados Business Manager Lite
Create customer quotes and invoices from within Trados Studio

Trados Business Manager Lite helps to simplify and speed up some of the daily tasks, such as invoicing and reporting, associated with running your freelance translation business.

More info »
Anycount & Translation Office 3000
Translation Office 3000

Translation Office 3000 is an advanced accounting tool for freelance translators and small agencies. TO3000 easily and seamlessly integrates with the business life of professional freelance translators.

More info »