For the pounds symbol, there has to be some file encoding chosen. If you are in the Windows world, you may have cp1252 encoded files (?).
In my answer, I assume this encoding and use latin1
on inputenc
.
If you use UTF-8, this setting has to be changed.
The following code tries to rebuild your screenshot (but in black and white so far).
\begin{filecontents*}{olive_oil_data.csv}
Code;Product Name;Unit Size;Pack Size;Unit Price
1463;AGULLO OLIVE OIL (Valencia , good value and fruity using Picual, Arbequina, Cornicabra and Chancló olives) ;5 litre;3;£17.00
1489;CAL MAS EXTRA VIRGEN OIL (Valencia, artisan single estate using Blanqueta and Alfafara olives );750ml;12;£8.52
3001;GOMEOLIVA OLIVE OIL (Andalucia, smooth and fruity using Hojiblanca and Picual olives);5 litre;3;£20.25
3002;GOMEOLIVA OLIVE OIL (Andalucia, smooth and fruity using Hojiblanca and Picual olives);2 litre;6;£8.33
3003;GOMEOLIVA OLIVE OIL (Andalucia, smooth and fruity using Hojiblanca and Picual olives );1 litre;15;£4.13
3008;MAIMONA OLIVE OIL GLASS (Extramadura, intense green colour using Morisca olives);750ml;12;£3.86
3004;MAIMONA OLIVE OIL TIN (Extramadura, intense green colour using Morisca olives);5 litre;4;£23.91
3016;MAS D'EN GIL OLIVE OIL (Priorat, artisan delicate taste using Arberquina olives );500ml;6;£8.57
3011;MOLINO OLIVE OILGLASS (Andalucia, unfiltered fruity using Hojiblanca and Picual olives );750ml;6;£4.85
3009;MOLINO OLIVE OIL TIN (Andalucia unfiltered fruity, Hojiblanca Picual olives);5 litre;3;£22.10
3019;ORGANIC OLIVE OIL (Andalucia, organic using Hojiblanca and Picual olives );5 litre;3;£26.93
3020;ORGANIC OLIVE OIL (Andalucia , organic using Hojiblanca and Picual olives);2 litre;6;£11.03
1331;CAPIRETE PICUAL OLIVE OIL (Jaen, single estate high expression oil);500ml;12;£5.77
3021;ORGANIC OLIVE OIL GLASS (Andalucia, Andalucia, organic using Hojiblanca and Picual olives );1 litre;12;£6.21
\end{filecontents*}
\documentclass[a4paper,11pt]{article}
% Encoding (e.g. Windows Cp1252)
% Has to be changed for UFT-8, if used
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage[top=1cm, bottom=1cm, left=1cm, right=1cm]{geometry}
\usepackage{longtable,array}
\usepackage{csvsimple}
\usepackage{lmodern}% could be left out or chanaged to another font
\newcommand*{\headentry}[2]{\multicolumn{1}{#1}{\centering\arraybackslash\bfseries #2}}
\begin{document}
\section*{Olive Oil}
\csvreader[
separator=semicolon,
before table=\sffamily\small,
longtable={|r|p{10cm}|r|r|r|},
table head={\hline%
\headentry{|m{1.8cm}|}{PRODUCT\linebreak CODE}
& \headentry{m{10cm}|}{PRODUCT NAME}
& \headentry{m{1cm}|}{UNIT\linebreak SIZE}
& \headentry{m{1cm}|}{PACK\linebreak SIZE}
& \headentry{m{2.2cm}|}{WHOLESALE\linebreak UNIT PRICE}\\\hline},
late after line=\\\hline,
]
{./olive_oil_data.csv}
{Code=\code,Product Name=\name,Unit Size=\unitsize,Pack Size=\packsize,Unit Price=\unitprice}
{\code & \name & \unitsize & \packsize & \unitprice}
\end{document}
Using the booktabs
package gives maybe some more pleasing results. See the following example code:
\begin{filecontents*}{olive_oil_data.csv}
Code;Product Name;Unit Size;Pack Size;Unit Price
1463;AGULLO OLIVE OIL (Valencia , good value and fruity using Picual, Arbequina, Cornicabra and Chancló olives) ;5 litre;3;£17.00
1489;CAL MAS EXTRA VIRGEN OIL (Valencia, artisan single estate using Blanqueta and Alfafara olives );750ml;12;£8.52
3001;GOMEOLIVA OLIVE OIL (Andalucia, smooth and fruity using Hojiblanca and Picual olives);5 litre;3;£20.25
3002;GOMEOLIVA OLIVE OIL (Andalucia, smooth and fruity using Hojiblanca and Picual olives);2 litre;6;£8.33
3003;GOMEOLIVA OLIVE OIL (Andalucia, smooth and fruity using Hojiblanca and Picual olives );1 litre;15;£4.13
3008;MAIMONA OLIVE OIL GLASS (Extramadura, intense green colour using Morisca olives);750ml;12;£3.86
3004;MAIMONA OLIVE OIL TIN (Extramadura, intense green colour using Morisca olives);5 litre;4;£23.91
3016;MAS D'EN GIL OLIVE OIL (Priorat, artisan delicate taste using Arberquina olives );500ml;6;£8.57
3011;MOLINO OLIVE OILGLASS (Andalucia, unfiltered fruity using Hojiblanca and Picual olives );750ml;6;£4.85
3009;MOLINO OLIVE OIL TIN (Andalucia unfiltered fruity, Hojiblanca Picual olives);5 litre;3;£22.10
3019;ORGANIC OLIVE OIL (Andalucia, organic using Hojiblanca and Picual olives );5 litre;3;£26.93
3020;ORGANIC OLIVE OIL (Andalucia , organic using Hojiblanca and Picual olives);2 litre;6;£11.03
1331;CAPIRETE PICUAL OLIVE OIL (Jaen, single estate high expression oil);500ml;12;£5.77
3021;ORGANIC OLIVE OIL GLASS (Andalucia, Andalucia, organic using Hojiblanca and Picual olives );1 litre;12;£6.21
\end{filecontents*}
\documentclass[a4paper,11pt]{article}
% Encoding (e.g. Windows Cp1252)
% Has to be changed for UFT-8, if used
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage[top=1cm, bottom=1cm, left=1cm, right=1cm]{geometry}
\usepackage{longtable,array,booktabs,xcolor}
\usepackage{csvsimple}
\usepackage{lmodern}% could be left out or chanaged to another font
\newcommand*{\headentry}[2]{\multicolumn{1}{m{#1}}{\centering\arraybackslash\textcolor{red!85!black}{\bfseries #2}}}
\begin{document}
\section*{Olive Oil}
\csvreader[
separator=semicolon,
before table=\sffamily\small,
longtable={cp{10cm}rrr},
table head={\toprule%
\headentry{1.8cm}{PRODUCT\linebreak CODE}
& \headentry{10cm}{PRODUCT NAME}
& \headentry{1cm}{UNIT\linebreak SIZE}
& \headentry{1cm}{PACK\linebreak SIZE}
& \headentry{2.2cm}{WHOLESALE\linebreak UNIT PRICE}\\\midrule},
late after line=\\\midrule,
late after last line=\\\bottomrule,
]
{./olive_oil_data.csv}
{Code=\code,Product Name=\name,Unit Size=\unitsize,Pack Size=\packsize,Unit Price=\unitprice}
{\code & \name & \unitsize & \packsize & \bfseries\unitprice}
\end{document}
Best Answer
One possible solution I can think of from the top of my head is to load the excel table with the python module pandas and than use the export as tex file function in pandas.