create report from csv file
create report from csv file
am 31.12.2007 22:30:57 von 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
Re: create report from csv file
am 01.01.2008 00:24:40 von davidfilmer
On Dec 31, 1:30 pm, Chris wrote:
> 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.
--
The best way to get a good answer is to ask a good question.
David Filmer (http://DavidFilmer.com)
Re: create report from csv file
am 01.01.2008 01:06:04 von jurgenex
On Chris wrote:
>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
Re: create report from csv file
am 01.01.2008 08:10:33 von Tad J McClellan
Chris wrote:
> 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.
--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"