Highlighted column and row not working. How to resolve it?

I need to highlight some columns and rows in the table. But the following code is not working. So kindly help me to resolve the issue. I am using miktex with winedt. Thank you.

\documentclass[CEJMed,PDF]{cej}
\usepackage{layout}
\usepackage{lipsum}
\usepackage{enumerate}
\usepackage{amssymb}
\usepackage{pbsi}
\usepackage{mathdots}
\usepackage[makeroom]{cancel}
\usepackage[table,xcdraw]{xcolor}
\usepackage[usestackEOL]{stackengine}
\theoremstyle{plain}
\newtheorem{defn}{Definition}[section]
\newtheorem{thm}[defn]{Theorem}
\newtheorem{cor}[defn]{Corollary}
\newtheorem{lem}[defn]{Lemma}
\newtheorem{prop}[defn]{Proposition}
\newtheorem{rem}[defn]{Remark}
\newtheorem{ex}[defn]{Example}
\newtheorem{re}[defn]{Result}
\newcommand{\eps}{\varepsilon}
\newcommand{\To}{\longrightarrow}
\newcommand{\h}{\mathcal{H}}
\newcommand{\newsarrow}{\nearrow \kern-12pt \swarrow \kern-12pt \smallsetminus}
\newcommand{\nupdownarrow}{\updownarrow \kern-11pt -}
\allowdisplaybreaks

\title{Article title}

%\articletype{Research Article} % Research Article, Review Article, Communication, Erratum

\author{Author 1\inst{1,}\email{@gmail.com} and
Author 2\inst{1}
}

\shortauthor{Author 1 and Author 2}

\institute{\inst{1}
Affiliation of Authors
}

\abstract{In this paper....
}

\keywords{keywords1, keywords2, keywords3, }

\msc{47A63.}

\begin{document}
\maketitle
\pagenumbering{arabic}
\setcounter{page}{41}

\section{Introduction}

\strutlongstacks{T}
\begin{table}[!h]
\centering
\begin{tabular}{|c|>{\columncolor[HTML]{C0C0C0}}c|c|c|c|c|c|} \hline
& $D_1$ & {\dots} & $D_j$ & {\dots} & $D_n$ & Supply \\ \hline
$O_1$ & \Centerstack{$c_{11}$\\ $d_{11}$ $\left(x_{11}\right)$\\ $p_{11}$} & {\dots} & \Centerstack{$c_{1j}$\\ $d_{1j}$ $\left(x_{1j}\right)$\\ $p_{1j}$} & {\dots} & \Centerstack{$c_{1n}$\\ $d_{1n}$ $\left(x_{1n}\right)$\\ $p_{1n}$} & $a_1$ \\ \hline
$\vdots$ &  & {\dots} &  & {\dots} &  &  \\ \hline
$O_i$ & \Centerstack{$c_{i1}$\\ $d_{i1}$  $\left(x_{i1}\right)$\\ $p_{i1}$} & {\dots} & \Centerstack{$c_{ij}$\\ $d_{ij}$ $\left(x_{ij}\right)$\\ $p_{ij}$} & {\dots} & \Centerstack{$c_{in}$\\ $d_{in}$ $\left(x_{in}\right)$\\ $p_{in}$} & $a_i$ \\ \hline
$\vdots$ &  & {\dots} &  & {\dots} &  &  \\ \hline
$O_m$ & \Centerstack{$c_{m1}$\\ $d_{m1}$ $\left(x_{m1}\right)$\\ $p_{m1}$} & {\dots} & \Centerstack{$c_{mj}$\\ $d_{mj}$ $\left(x_{mj}\right)$\\ $p_{mj}$} & {\dots} & \Centerstack{$c_{mn}$\\ $d_{mn}$ $\left(x_{mn}\right)$\\ $p_{mn}$} & $a_m$ \\ \hline
Demand & $b_1$ &  & $b_j$ &  & $b_n$ &  \\ \hline
\end{tabular}
\end{table}

\end{document}

• Please share us the exact class file. – M S Sep 1 '20 at 17:17
• Where did you get the document class from? – leandriis Sep 1 '20 at 17:17
• The above mentioned code is not working. It is showing several errors. – M S Sep 1 '20 at 17:18
• the document class available here sendanywhe.re/3O7X7ZYN – Jai Kumar Sep 1 '20 at 17:30
• There is a line '\includegraphics[width=1in]{123} in our file cej.cls and we have not that file... – F. Pantigny Sep 1 '20 at 19:22

To use the class cej

The class cej you intend to use is a heavily modified version of an old, deprecated class.

If your intention is to publish in the International Journal of Mathematics and its Applications, I suggest that you ask the editor for an updated latex template.

Like this, the class needs to be fixed in order to compile with pdflatex.

Replace LoadClass line 71 with

\LoadClass [10pt, twoside, pre, nofootinbib, secnumarabic, balancelastpage, superscriptaddress, showpacs, showkeys] {revtex4-1}

Also, the code in the table needs to be modified to get nicer colored rows and columns. See the commented lines.

\section{Introduction}

\strutlongstacks{T}
\begin{table}[!h]
\centering
%\begin{tabular}{|c|>{\columncolor[HTML]{C0C0C0}}c|c|c|c|c|c|} % original
\begin{tabular}{|a|>{\centering\columncolor[HTML]{C0C0C0}}p{6em}|d|a|d|a|>{\hfil}p{4em}|} % changed
\hline
& $D_1$ & {\dots} & $D_j$ & {\dots} & $D_n$ & Supply \\ \hline
$O_1$ & \Centerstack{$c_{11}$\\ $d_{11}$ $\left(x_{11}\right)$\\ $p_{11}$} & {\dots} & \Centerstack{$c_{1j}$\\ $d_{1j}$ $\left(x_{1j}\right)$\\ $p_{1j}$} & {\dots} & \Centerstack{$c_{1n}$\\ $d_{1n}$ $\left(x_{1n}\right)$\\ $p_{1n}$} & $a_1$ \\ \hline
$\vdots$ &  & {\dots} &  & {\dots} &  &  \\ \hline
$O_i$ & \Centerstack{$c_{i1}$\\ $d_{i1}$  $\left(x_{i1}\right)$\\ $p_{i1}$} & {\dots} & \Centerstack{$c_{ij}$\\ $d_{ij}$ $\left(x_{ij}\right)$\\ $p_{ij}$} & {\dots} & \Centerstack{$c_{in}$\\ $d_{in}$ $\left(x_{in}\right)$\\ $p_{in}$} & $a_i$ \\ \hline
$\vdots$ &  & {\dots} &  & {\dots} &  &  \\ \hline
$O_m$ & \Centerstack{$c_{m1}$\\ $d_{m1}$ $\left(x_{m1}\right)$\\ $p_{m1}$} & {\dots} & \Centerstack{$c_{mj}$\\ $d_{mj}$ $\left(x_{mj}\right)$\\ $p_{mj}$} & {\dots} & \Centerstack{$c_{mn}$\\ $d_{mn}$ $\left(x_{mn}\right)$\\ $p_{mn}$} & $a_m$ \\ \hline
\rowcolor[HTML]{a0a0a0}Demand & $b_1$ &  & $b_j$ &  & $b_n$ &  \\ % row color
\hline
\end{tabular}
\end{table}


(I assume you have the graphic file 123` that the class requires, line 120, to make the title).

This is the full output. (I created the (logo) file called 123 which is needed to make the title page.)