Solved

Parsing .TXT file

Posted on 2012-04-10
4
293 Views
Last Modified: 2012-04-18
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
Comment
Question by:ShaileshShinde
  • 2
4 Comments
 
LVL 2

Expert Comment

by:yogsoft
Comment Utility
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
 
LVL 1

Author Comment

by:ShaileshShinde
Comment Utility
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
 
LVL 7

Accepted Solution

by:
whosbetterthanme earned 500 total points
Comment Utility
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
 
LVL 1

Author Closing Comment

by:ShaileshShinde
Comment Utility
Thanks for the reference!
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Office 365 is currently available in five editions. Three of them are for business use: Office 365 Business Essentials, Office 365 Business, and Office 365 Business Premium. Two of them are for home/personal use: Office 365 Home and Office 365 Perso…
In a previous video Micro Tutorial here at Experts Exchange (http://www.experts-exchange.com/videos/1358/How-to-get-a-free-trial-of-Office-365-with-the-Office-2016-desktop-applications.html), I explained how to get a free, one-month trial of Office …

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now