Forum: Transit support
Topic: Convert Transit's MARTIF to Excel, tab-del or CSV?
Poster: wotswot
Post title: MTF to Excel
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]
Topic: Convert Transit's MARTIF to Excel, tab-del or CSV?
Poster: wotswot
Post title: MTF to Excel
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]