[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 303
  • Last Modified:

Parsing .TXT file

Hello Experts,

I have received and .TXT files from client which needs to be translated. For translation, we need to send it in word two column table format.
The .TXT file contains different cases like below....
Also, Column1 and 3 needs to be highlighted in yellow.

Case 1:
TEST_DATE_TEST      :   "THIS IS SAMPLE TEXT", //test_date_test
Word Table Format should be...
Column1:  TEST_DATE_TEST      :  
Column2:  "THIS IS SAMPLE TEXT"
Column3: //test_date_test

Case 2:
testgroup.name.label=Name
Column1:  testgroup.name.label=  
Column2:  Name

Case 3:
testbody.error=An Error has occurred.<br>Please contact your system administrator about this error.
Column1: testbody.error=
Column2:  An Error has occurred.<br>Please contact your system administrator about this error.  ....Highlight in yellow the tags appearing between like <br>

Can you please provide any reference macro or Perl script or XSLT to achieved this.

Thanks in Advance,
Shailesh
0
ShaileshShinde
Asked:
ShaileshShinde
  • 2
1 Solution
 
yogsoftCommented:
You can use first import the data in Excel file using text file import feature under Data tab.
To perform this use below steps:

1. Go to Data tab and select From Text icon and select text file.
2. On text import wizard select Delimited option in Step 1
3. Select Delimiters and add = as delimiter in Other text box and click on Finish.

This will import the data in different column from where can copy the same to word document.
0
 
ShaileshShindeAuthor Commented:
Hello Expert,

This will be a manual task. We need to automate this using Perl, Macro or XSLT. Can you provide the reference for any of these scripts to achieved this process.

Thanks,
Shail
0
 
whosbetterthanmeCommented:
If you need it specifically in Word format, then you can try the Word module:

http://search.cpan.org/~johanl/Win32-Word-Writer-0.03/lib/Win32/Word/Writer.pm

There is sample code there to try.
0
 
ShaileshShindeAuthor Commented:
Thanks for the reference!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now