I need help with a program that reads lines from a CSV input file and generates an output file in tabular format. So the first line in the input file should have the header infromation for the table and all the other lines are data lines. After I need to create a variant that gives the same output file and generates an HTML
file. So it's supposed to have an HTML table essentially, with a row
for each data line.
So an example of the CSV file would look like this:
Country, Code, Capital, Language, Currency
Afghanistan,AF, Kabul,Afghani,P ashto
Albania,AL,Tira na,Lek,Albanian
Algeria,DZ,Algi ers,Dinar,Arabi c
Andorra,AD,And. La Vella,French Franc,Catalan
Angola,AO,Luand a,New Irwanza,Portugu ese
Anguilla,AI,,Ea st Caribbean Dollar,
And the output should come like this:
COUNTRY CODE CAPITAL LANGUAGE CURRENCY
Afghanistan AF Kabul Afghani Pashto
Albania AL Tirana Lek Albanian
Algeria DZ Algiers Dinar Arabic
Andorra AD And. La Vella French Franc Catalan
Angola AO Luanda New Irwanza Portuguese
Anguilla AI East Caribbean Dollar
Any help please?
file. So it's supposed to have an HTML table essentially, with a row
for each data line.
So an example of the CSV file would look like this:
Country, Code, Capital, Language, Currency
Afghanistan,AF, Kabul,Afghani,P ashto
Albania,AL,Tira na,Lek,Albanian
Algeria,DZ,Algi ers,Dinar,Arabi c
Andorra,AD,And. La Vella,French Franc,Catalan
Angola,AO,Luand a,New Irwanza,Portugu ese
Anguilla,AI,,Ea st Caribbean Dollar,
And the output should come like this:
COUNTRY CODE CAPITAL LANGUAGE CURRENCY
Afghanistan AF Kabul Afghani Pashto
Albania AL Tirana Lek Albanian
Algeria DZ Algiers Dinar Arabic
Andorra AD And. La Vella French Franc Catalan
Angola AO Luanda New Irwanza Portuguese
Anguilla AI East Caribbean Dollar
Any help please?
Comment