• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 238
  • Last Modified:

Parsing text files with perl?

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
treyjeff
Asked:
treyjeff
  • 9
  • 7
1 Solution
 
maneshrCommented:
pl. post your sample input data and the desired output here.

i think i can come up with a script for the same.
0
 
treyjeffAuthor Commented:
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
 
maneshrCommented:
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
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
treyjeffAuthor Commented:
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
 
maneshrCommented:
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
 
treyjeffAuthor Commented:
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
 
maneshrCommented:
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
 
treyjeffAuthor Commented:
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
 
maneshrCommented:
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
 
maneshrCommented:
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
 
treyjeffAuthor Commented:
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
 
treyjeffAuthor Commented:
Adjusted points from 40 to 45
0
 
maneshrCommented:
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
 
maneshrCommented:
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
 
treyjeffAuthor Commented:
Adjusted points from 45 to 100
0
 
maneshrCommented:
Thanks TJ :-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

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