mercredi 20 avril 2016

perl program to align the content in text file to excel sheet with perfect alligned cells

I have a text file with the content like given below and it extends upto 280+ sets "ID 'xxxx' NAME 'xxxx' NUMBER 'xxxx' ADDRESS_LINE_1 'xxxx' CITY xxxx ZIP_CODE 'xxxx' PHONE 'xxxxx'

ID 'xxxxyyy' NAME 'xxxxyyyy' NUMBER 'xxxxyyyy' ADDRESS_LINE_1 'xxxxyyyy' CITY 'xxxxyyyy' ZIP_CODE 'xxxxyyyy' PHONE 'xxxxxyyyy'

ID 'xxxx' NAME 'xxxx' NUMBER 'xxxx' ADDRESS_LINE_1 'xxxx' CITY xxxx ZIP_CODE 'xxxx' PHONE 'xxxxx'

ID 'xxxxyyy' NAME 'xxxxyyyy' NUMBER 'xxxxyyyy' ADDRESS_LINE_1 'xxxxyyyy' CITY 'xxxxyyyy' ZIP_CODE 'xxxxyyyy' PHONE 'xxxxxyyyy'"

I want to store the content in the excel sheet like:

"ID NAME NUMBER ADDRESS_LINE_1 CITY ZIP_CODE PHONE
1 aaa sdaf dfdsfsdf df 5445 456654

2 bbb assd sdasfaaf fsd 4565 45275

3 ccc dfdf asdfff df 457 45287"

Help me to do that. Am confused how to print the content like this in excel sheet by import the content in text file.i am just a beginner so guide me from the intial till the last step. Thank you




Aucun commentaire:

Enregistrer un commentaire