Good morning all,
I'm having a rough time handling the output/display of CSV data into HTML tables. The way the CSV file is formatted, several fields can be duplicated over 2 or more rows to indicate that the value should span over that many rows in the HTML table. So,
Cow, Dog, Lion, Tiger, Eagle
Cow, Dog, Lion, Tiger, Eagle
Cow, Dog, Cat, Tiger, Crow
Cow, Dog, Cat, Tiger, Crow
Air, Water, Winter, Earth, Fall
Air, Water, Winter, Earth, Fall
Air, Diamond, Fire, Earth, Wind
Air, Diamond, Fire, Earth, Wind
would indicate a five-column/two-row table, that splits into three rows, and then four rows after the Dog column. Cow, Dog, and Tiger would represent cells with rowspan='4', while Lion, Eagle, Cat, and Crow represent cells with rowspan='2'. The next HTML table then would start at the Air row.
I have not, for the life of me, been able to get this data formatted into neat tables. The customer doesn't want to install any modules that might be of help. And the data isn't consistent/uniform or predictable, so my strategy thus far has been to embed HTML in my CGI and try to parse one row of data at a time into an HTML template.
Can anyone recommend a better way of doing this? I'd like to simply count the number of times the same value appears in each column ("$AoA[$row][0], $AoA[$row][1], $AoA[$row][2], etc...) but I can't figure out how to do this(I've never been any good with hashes or arrays of arrays...).
How can I output HTML with dynamic rowspans, Please help!!!
'Well, it's one louder, isn't it?...
What we do is, if we need that extra push over the cliff, you know what we do?...Eleven. Exactly. One louder.'
I'm having a rough time handling the output/display of CSV data into HTML tables. The way the CSV file is formatted, several fields can be duplicated over 2 or more rows to indicate that the value should span over that many rows in the HTML table. So,
Cow, Dog, Lion, Tiger, Eagle
Cow, Dog, Lion, Tiger, Eagle
Cow, Dog, Cat, Tiger, Crow
Cow, Dog, Cat, Tiger, Crow
Air, Water, Winter, Earth, Fall
Air, Water, Winter, Earth, Fall
Air, Diamond, Fire, Earth, Wind
Air, Diamond, Fire, Earth, Wind
would indicate a five-column/two-row table, that splits into three rows, and then four rows after the Dog column. Cow, Dog, and Tiger would represent cells with rowspan='4', while Lion, Eagle, Cat, and Crow represent cells with rowspan='2'. The next HTML table then would start at the Air row.
I have not, for the life of me, been able to get this data formatted into neat tables. The customer doesn't want to install any modules that might be of help. And the data isn't consistent/uniform or predictable, so my strategy thus far has been to embed HTML in my CGI and try to parse one row of data at a time into an HTML template.
Can anyone recommend a better way of doing this? I'd like to simply count the number of times the same value appears in each column ("$AoA[$row][0], $AoA[$row][1], $AoA[$row][2], etc...) but I can't figure out how to do this(I've never been any good with hashes or arrays of arrays...).
How can I output HTML with dynamic rowspans, Please help!!!
'Well, it's one louder, isn't it?...
What we do is, if we need that extra push over the cliff, you know what we do?...Eleven. Exactly. One louder.'