Solved

Parsing .TXT file

Posted on 2012-04-10
4
295 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
ID: 37831325
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
ID: 37832000
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
ID: 37832374
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
ID: 37864372
Thanks for the reference!
0

Featured Post

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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.…
This article describes how to use the Send to Mail Recipient command. The instructions apply generally to Office 2007 and later versions, but Microsoft® Word 2013 was used for the specific steps and figures.  What is Send to Mail Recipient? Send…
In this video, we show how to convert an image-only PDF file into a PDF Searchable Image file, that is, a file with both the image (typically from scanning) and text, which is created in an automated fashion with Optical Character Recognition (OCR) …
This video shows where to find templates, what they are used for, and how to create and save a custom template using Microsoft Word.

770 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