# Problem with table installed from Excel2Latex [closed]

I am writing a paper for my thesis and I'm having getting a reoccurring error about " LaTeX Error: Option clash for package xcolor. See the LaTeX manual or LaTeX Companion for explanation. Type H for immediate help. ... l.6 \usepackage{booktabs} " My preamble reads:

\documentclass[openany, oneside]{book}
\usepackage{hyperref}
\usepackage{fixltx2e}
\usepackage[table]{xcolor}
\usepackage{booktabs}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{tabularx}
\usepackage{setspace}
\usepackage[super]{nth}
\usepackage{url}

\usepackage{indentfirst}
\usepackage[page,titletoc,title]{appendix}
\hypersetup{
filecolor=magenta,
urlcolor=cyan,
}


Here is my code from Excel2Latex:

\begin{table}[htbp]
\centering
\caption{Descriptive Statistics}
\begin{tabular}{|p{10.93em}|p{6.215em}|p{6.855em}|}
\rowcolor[rgb]{ .384,  .706,  .776} \textcolor[rgb]{ 1,  1,  1}{\textbf{Variable}} & \textcolor[rgb]{ 1,  1,  1}{\textbf{Frequency}} & \multicolumn{1}{p{6.855em}}{\textcolor[rgb]{ 1,  1,  1}{\textbf{Percentage}}} \\
\cmidrule{2-3}    \rowcolor[rgb]{ .827,  .898,  .918} Binge Drinker            Not Binge Drinker       Binge Drinker &                                       1147             2982 &                                                27.8                 72.2 \\
\midrule
\rowcolor[rgb]{ .918,  .949,  .961} Education                    Freshman               Sophomore/Junior    Senior/Grad &                      1169        1897           1063 &                          28.3               45.9                25.7      \\
\midrule
\rowcolor[rgb]{ .827,  .898,  .918} Income                        Poverty       Low/Middle Class     Middle Class              High Class             &                    810            1267          633            1419 &                       19.6           30.7             15.3           34.4 \\
\midrule
\rowcolor[rgb]{ .918,  .949,  .961} Race           White(Non-Hispanic)  Black(Non-Hispanic)  Hispanic                Other &                 2525            480            714           410 &                         61.2                 11.6            17.3                9.9 \\
\midrule
\rowcolor[rgb]{ .827,  .898,  .918} Sex                              Male                     Female &                   1800             2329 &                        43.6                 56.4 \\
\midrule
\rowcolor[rgb]{ .918,  .949,  .961} Marijuana Use      Never Used             Used Before\newline{}\newline{}   &                 2369         1760 & \cellcolor[rgb]{ .827,  .898,  .918}                       57.4                 42.6 \\
\end{tabular}%

• your preamble gives an error about the unknown package \usepackage{grad_proseminar} but does not give the option clash error. I can only assume that your local grad_proseminar package loads color already so you should not need to load it again – David Carlisle Jul 31 '18 at 22:41
• It may be given to you but that doesn't help anyone debug your problem if they can not run your example. please post an example that people can run that generates an option clash error. Note that if you type h to the option clash error latex tells you in detail what the clash is and suggests which options to add to \documentclass to resolve it. Or perhaps as a guess, just move the xcolor line before the grad_poseminar one – David Carlisle Aug 1 '18 at 7:15