Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I used Excel2LaTeX to create a table in LaTeX and here is the code that gives me an error.

% Table generated by Excel2LaTeX from sheet 'Sheet1'
\begin{table}[htbp]
  \centering
  \caption{Add caption}
    \begin{tabular}{rrrrr}
    \toprule
          &       & Start date & End date & Days spent \\
    \midrule
    \multicolumn{1}{c}{\multirow{6}[12]{*}{\textbf{Background research}}} & Research which existing technologies exist for recommendation systems & 06/10/2011 & 10/10/2011 & \multicolumn{1}{c}{\multirow{6}[12]{*}{22}} \\
    \multicolumn{1}{c}{} & Investigate the problems being face by the current recommender systems & 11/10/2011 & 15/10/2011 & \multicolumn{1}{c}{} \\
    \multicolumn{1}{c}{} & Learn what Semantic Web is and how the it is being implemented to solve problems & 16/10/2011 & 20/10/2011 & \multicolumn{1}{c}{} \\
    \multicolumn{1}{c}{} & Investigate how semantic web is being used for recommendation systems & 16/10/2011 & 20/10/2011 & \multicolumn{1}{c}{} \\
    \multicolumn{1}{c}{} & Read research papers on to find out more on work about music recommendation that has already been done in the past & 21/10/2011 & 27/10/2011 & \multicolumn{1}{c}{} \\
    \multicolumn{1}{c}{} & Deliverable: Write a literature survey to summarize research findings & 21/10/2011 & 28/10/2011 & \multicolumn{1}{c}{} \\
    \multicolumn{5}{r}{}                  & \\
    \multicolumn{1}{c}{\multirow{4}[8]{*}{\textbf{Analysis \& Design}}} & Create a structured list of requirements from the problem statement & 29/10/2011 & 04/11/2011 & \multicolumn{1}{c}{\multirow{2}[4]{*}{6}} \\
    \multicolumn{1}{c}{} & Deliverable produced: Create a structured list of requirements from the problem statement & 29/10/2011 & 04/11/2011 & \multicolumn{1}{c}{} \\
    \multicolumn{1}{c}{} & Begin prototyping and experimenting with Semantic Web & 05/11/2011 & 09/12/2011 & \multicolumn{1}{c}{\multirow{2}[4]{*}{34}} \\
    \multicolumn{1}{c}{} & Deliverable produced: A basic prototype of the recommender system & 05/11/2011 & 09/12/2011 & \multicolumn{1}{c}{} \\
    \multicolumn{5}{r}{}                  & \\
    \multicolumn{1}{c}{\multirow{21}[42]{*}{\textbf{Implementation}}} & \textbf{Iteration 1  - Implementing and testing core functionality of the website} &       &       &  \\
    \multicolumn{1}{c}{} & Let users register with the website & 10/12/2011 & 16/12/2011 & \multicolumn{1}{c}{\multirow{7}[14]{*}{34}} \\
    \multicolumn{1}{c}{} & Simulate users listening to songs/albums & 10/12/2011 & 16/12/2011 & \multicolumn{1}{c}{} \\
    \multicolumn{1}{c}{} & Enable searching for music and playlists in the website & 17/12/2011 & 23/12/2011 & \multicolumn{1}{c}{} \\
    \multicolumn{1}{c}{} & Let users create playlists and add/remove songs to them & 24/12/2011 & 30/12/2011 & \multicolumn{1}{c}{} \\
    \multicolumn{1}{c}{} & Users can integrate with Facebook and find friends that are also registered on the website & 31/12/2011 & 06/01/2012 & \multicolumn{1}{c}{} \\
    \multicolumn{1}{c}{} & Users can comment on a playlist and Like a playlist & 07/01/2012 & 13/01/2012 & \multicolumn{1}{c}{} \\
    \multicolumn{1}{c}{} & Deliverable produced: The first iteration of the website without a recommendation system & 10/12/2011 & 13/01/2012 & \multicolumn{1}{c}{} \\
    \multicolumn{1}{c}{} & \multicolumn{4}{r}{}          & \\
    \multicolumn{1}{c}{} & \textbf{Iteration 2 - Implemented and testing core functionality of the algorithm} &       &       &  \\
    \multicolumn{1}{c}{} & Integrate Semantic Web so that recommendation algorithm can be implemented & 14/01/2012 & 20/01/2012 & \multicolumn{1}{c}{\multirow{5}[10]{*}{27}} \\
    \multicolumn{1}{c}{} & The website shall allow users to get music recommendations based on the friend’s taste & 21/01/2012 & 03/02/2012 & \multicolumn{1}{c}{} \\
    \multicolumn{1}{c}{} & The website shall allow users to get music recommendations based on the user’s taste & 21/01/2012 & 10/02/2012 & \multicolumn{1}{c}{} \\
    \multicolumn{1}{c}{} & Deliverables produced: Algorithm for music recommendation & 14/01/2012 & 10/02/2012 & \multicolumn{1}{c}{} \\
    \multicolumn{1}{c}{} & Second iteration of the website with core functionality in place & 14/01/2012 & 10/02/2012 & \multicolumn{1}{c}{} \\
    \multicolumn{1}{c}{} & \multicolumn{4}{r}{}          & \\
    \multicolumn{1}{c}{} & \textbf{Iteration 3 - Adding additional features (Could have's and Wont have's in the requirements)} &       &       &  \\
    \multicolumn{1}{c}{} & Carry out the finishing touches of the website & 11/02/2012 & 24/02/2012 & \multicolumn{1}{c}{\multirow{4}[8]{*}{13}} \\
    \multicolumn{1}{c}{} & View a feed which lets them find out what their friends are doing on the site through likes and comments & 11/02/2012 & 17/02/2012 & \multicolumn{1}{c}{} \\
    \multicolumn{1}{c}{} & Allow users to subscribe to a playlist & 18/02/2012 & 24/02/2012 & \multicolumn{1}{c}{} \\
    \multicolumn{1}{c}{} & Deliverable: Final version of the website with added features & 11/02/2012 & 24/02/2012 & \multicolumn{1}{c}{} \\
    \multicolumn{5}{r}{}                  & \\
    \multicolumn{1}{c}{\multirow{2}[3]{*}{\textbf{Documentation}}} & Begin the final report & 25/02/2012 & 30/03/2012 & \multicolumn{1}{c}{\multirow{2}[3]{*}{34}} \\
    \multicolumn{1}{c}{} & Deliverable: Final report with explaining all stages of the software development cycle & 25/02/2012 & 30/03/2012 & \multicolumn{1}{c}{} \\
    \bottomrule
    \end{tabular}%
  \label{tab:addlabel}%
\end{table}%

The error I'm getting is this

! Extra alignment tab has been changed to \cr.
<template> \endtemplate
l.692 \multicolumn{5}{r}{} &
\\
You have given more \span or & marks than there were
in the preamble to the \halign or \valign now in progress.
So I'll assume that you meant to type \cr instead.

Anybody know what's going on?

share|improve this question
    
David's answer solved the problem but I don't have 6 columns in my excel sheet. link here is the link to my excel sheet –  user972616 Apr 4 '12 at 15:45

2 Answers 2

up vote 2 down vote accepted

You have 5 columns

{rrrrr}

but you have

\multicolumn{5}{r}{}                  & \\

so that's a 5 column span then & then an empty cell so six columns,

Easiest would be to add an extra r at the top so you have 6 columns declared.

share|improve this answer

This is a known bug in excel2latex, which will be fixed in version 3.2 (currently under development). Visit https://code.launchpad.net/excel2latex for version updates.

share|improve this answer
    
Thanks for chiming in! –  krlmlr Apr 24 at 17:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.