create report from csv file

C

Chris

Does anybody know of a perl or something similiar that can take a csv
database and create a report. Assumptions the csv file is presorted
and is delimited with | pipes. Only one field will need to match.

R&D

Milpitas
393 Licoln Drive 33,000 sq.ft. 1.20
400 Maple Lane 12,000 sq.ft. 1.25

San Jose
31 First Street 40,000 sq.ft. 1.50
9 Third Street 30,000 sq.ft. 1.40

I've looked at ezscripting.com but they can't group by city.

Thanks,
Chris
 
D

davidfilmer

Does anybody know of a perl or something similiar that can take a csv
database and create a report. Assumptions the csv file is presorted
and is delimited with | pipes.

Then it's not really a CSV file. CSV files are delimited with commas
(that's what the "C" stands for).

This task sounds like it could be handled by a trivial Perl script of
about a half dozen lines.

Even though you have made no apparent effort to locate or familiarize
yourself with the posting guidelines for this newsgroup (posted here
regularly and available at http://www.rehabitation.com/clpmisc/clpmisc_guidelines.html),
you may yet find that some group participants are of good holiday
cheer and may even be willing to toss a quick-and-dirty program at
you. However, since you did not provide any example of your input
data (only a poor description of it), it's hard to help you.
 
J

Jürgen Exner

Does anybody know of a perl or something similiar that can take a csv
database and create a report.

Calling CSV a database is somewhat a stretch of imagination.
But yes, there are several modules that can parse CSV.
Assumptions the csv file is presorted
and is delimited with | pipes.

Then it is not a CSV file.
Only one field will need to match.

And which one would that be? And what is it supposed to match? And what do
you want to do with the matched data?
R&D

Milpitas
393 Licoln Drive 33,000 sq.ft. 1.20
400 Maple Lane 12,000 sq.ft. 1.25

San Jose
31 First Street 40,000 sq.ft. 1.50
9 Third Street 30,000 sq.ft. 1.40

That looks like the data is delimited by tab or hardcoded by position.

jue
 
T

Tad J McClellan

Chris said:
Does anybody know of a perl


What does "a perl" mean when you say it?

or something similiar that can take a csv
database and create a report.


That should take less than 10 lines of Perl code.

Assumptions the csv file is presorted


What does sorting have to do with your desired algorithm?

and is delimited with | pipes. Only one field will need to match.


Need to match *what* ?

R&D

Milpitas
393 Licoln Drive 33,000 sq.ft. 1.20
400 Maple Lane 12,000 sq.ft. 1.25

San Jose
31 First Street 40,000 sq.ft. 1.50
9 Third Street 30,000 sq.ft. 1.40


There are no pipe characters there.

I thought you said that the data was delimited (but you meant separated)
by pipe characters, so what does this data that you are showing have
to do with the problem of splitting pipe-separated fields?

I've looked at ezscripting.com but they can't group by city.


Look at writing a bit of Perl code instead.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top