Automating the creation of name badges for an event

ticket package fits very well for this use. The pin example is what you seek for:

%%%%
%
% ticket.sty example file for a pin for conferences
%
%%%%
% use the corresponding paper size for your ticket definition
\documentclass[a4paper,10pt]{letter}

% load ticket.sty with the appropriate ticket definition
\usepackage[freepin,crossmark]{ticket}

% load misc stuff
\usepackage{graphicx}

% make your default ticket. \ticketdefault is somewhat like a background
\renewcommand{\ticketdefault}{%
  \put(50,  3){\includegraphics[width=15mm]{ifmlogoc}}
  \put( 5, 13){\line(1,0){60}}
  \put( 7, 10){\scriptsize Animal annual meeting (AAM)}
  \put( 7,  7){\scriptsize In the gardens}
  \put( 7,  4){\scriptsize April 1, 2000}
}

% now what do you like to put in your ticket
\newcommand{\confpin}[2]{\ticket{%
    \put(35,36){\makebox[0mm]{\bfseries\Large #1}}
    \put(35,28){\makebox[0mm]{\bfseries\large #2}}%
}}


%% the pins for the partipiciants ... ;-)
%% you can generate this part from a database!
\begin{document}
\sffamily
\confpin{Camelus dromedarius}{North Africa}
\confpin{Urocyon cinereoargenteus}{America}
\confpin{Galago moholi}{South Africa}
\confpin{Dasypus novemcintus}{South America}
\confpin{Rhinocerus sondaicus}{Java}
\confpin{Canis lupus}{Northern sphere}
\confpin{Ramphastus spec.}{South Amerika}
\confpin{Panthera tigris sondaica}{Java}
\confpin{Hippocampus spec.}{the ocean}
\confpin{Anthonomus grandis}{Mexico}
\confpin{Petrogale penicillata}{Australia}
\confpin{Tarsius spec.}{Sumatra}
\end{document}

The result is as follows:

enter image description here

For boxed badges, use

\usepackage[freepin,boxed]{ticket}

in the preamble. For the other options, see the manual.

To create confpin content, you can use the following command in Excel and copy the content to your document. It assumes that column A has name surname, and column B has affiliation.

=CONCATENATE("\confpin{"; A2; "}{";B2; "}")

Here is a simple example. Please, adapt it to your case.

The file informations.csv (the first line is for variable names)

"name","sirname","university"
"Aaaa","Bbbb","Cccc"

The file foo.tex (format according to your preferences)

\documentclass[12pt,a5paper,landscape]{article}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% If the error
% ``No room for ..''
% increase the reserved inserts
%--------------------------------------------
% \usepackage{etex} % to use etex extensions 
% \reserveinserts{28} % using etex extensions

\usepackage[english]{babel}

% UTF-8 support any characters
\usepackage[utf8]{inputenc}
%\usepackage[T1]{fontenc}
%\usepackage{ucs}
% Defaul loaded character table is ASCII and latin

\usepackage{amsmath}
\usepackage{amssymb} % amsfonts is part of amssymb

\usepackage{graphicx}
\usepackage[usenames]{color}
%\usepackage{chancery} % change serif to Zapf Chancery
\usepackage{datatool}
\usepackage[lmargin=1cm,tmargin=1cm,bmargin=1.6cm,rmargin=1.6cm]{geometry}
\usepackage{fancybox} % border page and boxes
\usepackage{mathpazo}

\sloppy

\pagestyle{empty}

% box around pages, using fancybox package
%
% \fancypage{\fbox}{}
% \fancypage{\setlength{\fboxsep}{8pt}\setlength{\shadowsize}{8pt}\shadowbox}{}


%\fancypage{\setlength{\fboxsep}{8pt}\shadowbox}{}
\fancypage{\setlength{\fboxsep}{8pt}\doublebox}{}

\newcommand{\event}{Insert the title of event here}

\begin{document}
% default separator is coma and default delimiter is double quote      
% \DTLsetseparator{,}
% \DTLsetdelimiter{"}

\DTLloaddb{list}{informations.csv}

\DTLforeach{list}{%
\firstname=name,\sirname=sirname,\university=university}{%

\fontfamily{pbk}\fontseries{m}\fontshape{n}\selectfont  
\baselineskip 2.5em

\vspace*{2cm} 

\begin{center}
{\Large \firstname~\MakeUppercase{\sirname}}

\vskip 2cm 

{\large \university}

\vfill 

\hrulefill

\event~\fbox{logo here}
\end{center}

\newpage
}  
\end{document}

The output enter image description here


A slight variation from Sigur's answer, building on his code:

\documentclass{article}
\usepackage{pdfpages}
\usepackage[a4paper,margin=.5in]{geometry}
\usepackage{filecontents}
\begin{filecontents*}{informations.csv}
name,sirname,university
Jon,Doe,From Moon
Jane,Dipp,From Mars
Jon,Doe,From Moon
Jane,Dipp,From Mars
Jon,Doe,From Moon
Jane,Dipp,From Mars
Jon,Doe,From Moon
Jane,Dipp,From Mars
Jon,Doe,From Moon
Jane,Dipp,From Mars
\end{filecontents*}
\begin{filecontents*}{cards.tex}
\documentclass[12pt,a5paper,landscape]{article}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{datatool}
\usepackage[lmargin=1cm,tmargin=1cm,bmargin=1.6cm,rmargin=1.6cm]{geometry}
\usepackage{fancybox} % border page and boxes
\usepackage{mathpazo}
\sloppy
\pagestyle{empty}
\fancypage{\setlength{\fboxsep}{8pt}\doublebox}{}
\newcommand{\event}{Univeristy Name \\
University Address - 1\\
University Address - 2}

\begin{document}

\DTLloaddb{list}{informations.csv}

\DTLforeach{list}{%
\firstname=name,\sirname=sirname,\university=university}{%
\fontfamily{pbk}\fontseries{m}\fontshape{n}\selectfont  
\baselineskip 2.5em
\vspace*{2cm} 
\begin{center}
{\Large \firstname~\MakeUppercase{\sirname}}
\vskip 2cm 
{\large \university}
\vfill 

\hrulefill

\parbox[b]{.7\textwidth}{\event}\hfill\fbox{\includegraphics[width=2cm]{example-image-a}}
\end{center}
\newpage
}%
\end{document}
\end{filecontents*}
%
% compile with pdflatex
\immediate\write18{pdflatex cards.tex}
%
\begin{document}
\includepdf[pages=-,nup=2x4,delta=0.0in 0cm,turn=true,frame=true]{cards.pdf}
\end{document}

enter image description here