Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Parsing text files with perl?

Posted on 2000-03-28
16
Medium Priority
?
233 Views
Last Modified: 2010-03-05
I have a VBA macro that parses a text file and displays the information into Excel.  I'd like to do the same thing but parse the files with perl and have them displayed in an HTML table.  I'm going to require a lot of help with this so am looking for someone to work closely with.  I will post 40 points now but will increase later.  If you can help please contact me :)
0
Comment
Question by:treyjeff
  • 9
  • 7
16 Comments
 
LVL 16

Expert Comment

by:maneshr
ID: 2665110
pl. post your sample input data and the desired output here.

i think i can come up with a script for the same.
0
 
LVL 1

Author Comment

by:treyjeff
ID: 2665276
It would be much easier if you had Excel and i could send you what you need :)  I have some things zipped at http://www.hyrum.net/vensched.zip
0
 
LVL 16

Expert Comment

by:maneshr
ID: 2665311
ok i have downloaded the zip file. it has a csv and a .xls file in it.

the csv file has 5 cols in it. is this the data that forms the input??
will this data already be in .csv format??

if ans to the above is yes, how do you want to present the data in HTML??

let me know
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 1

Author Comment

by:treyjeff
ID: 2665361
Can you open the xls file?  Excel.  It also pulls data from other csv files so I think everything will be pulled from about 7 files.  Just one or two columns per though I think.  I would like it all in a table format and the thing is, i want to be prompted for a vendor code, much like the excel file is doing.
0
 
LVL 16

Expert Comment

by:maneshr
ID: 2665366
i opened the .xls file and it starts some VBA code. since the path and other settings on my PC are diff, it gives me a debugger error.

i want you to tell me what the VBA does and what you want to implement in PERL.

0
 
LVL 1

Author Comment

by:treyjeff
ID: 2665406
The paths can be changed in the VBA code but here is what it does.  The csv files are files that are automatically generated by another system we have and they are used for a vendor purchasing schedule.  We would usually have our vendors call us and our sales people would use the Excel file to see what is needed.

We want the vendor to be able to login to our website and see what we need.  It pulls vendor name, part number. description, dates needed etc.  Everything we want done in html is in the VBA, just need to port it over for html tables.  It would be ideal to do some formatting after but that is after,
0
 
LVL 16

Expert Comment

by:maneshr
ID: 2665413
ok so from what i understand this is what you need.

* CGI script for internal use (for sales folks) that would allow them to query on vendor ID and/or buyer name.

* CGI script for outsiders (vendors) that would allow them to see what your requirements are.

Finally data presentation in HTML.

let me know if the above is right.
0
 
LVL 1

Author Comment

by:treyjeff
ID: 2665419
The cgi for inside isn't needed.  They can continue to use the Excel file OR they can view the same thing the vendor can on the website.  So we need one script for the vendors and data presentation for the web.  I have never parsed files so it's new to me.
0
 
LVL 16

Expert Comment

by:maneshr
ID: 2665427
good.

now can you provide me the input file that this cgi script would read to allow that query.
in the zip file that i picked up, there is only ONE csv file. is that the only file required??

if not send me all the input files via email (maneshr@hotmail.com) or on your website like you did before.

0
 
LVL 16

Expert Comment

by:maneshr
ID: 2665429
good.

now can you provide me the input file that this cgi script would read to allow that query.
in the zip file that i picked up, there is only ONE csv file. is that the only file required??

if not send me all the input files via email (maneshr@hotmail.com) or on your website like you did before.

0
 
LVL 1

Author Comment

by:treyjeff
ID: 2665474
I have sent them.  If you can open the excel file you can change the path of these files so that you can see how it's all laid out.
0
 
LVL 1

Author Comment

by:treyjeff
ID: 2665490
Adjusted points from 40 to 45
0
 
LVL 16

Expert Comment

by:maneshr
ID: 2665543
i got 7 files (Pur001.csv, Pur002.csv, Pur015.csv, Pur018.csv, Pur019.csv, Spur012.csv, Spur013.csv) in pur directory and 1 file (Smat007.csv) in the mat directory.

can you tell me what each of this file is meant for and the various columns that are present. Also let me what is it that the vendor can search on with an eg.

0
 
LVL 16

Accepted Solution

by:
maneshr earned 400 total points
ID: 2665553
i got 7 files (Pur001.csv, Pur002.csv, Pur015.csv, Pur018.csv, Pur019.csv, Spur012.csv, Spur013.csv) in pur directory and 1 file (Smat007.csv) in the mat directory.

can you tell me what each of this file is meant for and the various columns that are present. Also let me what is it that the vendor can search on with an eg.

0
 
LVL 1

Author Comment

by:treyjeff
ID: 2749137
Adjusted points from 45 to 100
0
 
LVL 16

Expert Comment

by:maneshr
ID: 2749173
Thanks TJ :-)
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
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.…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans

783 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