Q:

How to make \tableofcontents look like table as in the figure attached below

In latex, the toc comes without border but the firm where I work requires me to follow the toc in this format. Any help will be appreciated.
\documentclass[11pt, openany, oneside]{book}
\usepackage[english]{babel}
\usepackage{helvet}
\renewcommand{\familydefault}{\sfdefault}
\usepackage[paper=a4paper,margin=1.3 in]{geometry}% http://ctan.org/pkg/geometry
\usepackage{graphicx}
\usepackage{fancyhdr}
\usepackage[toc,page]{appendix}
\newenvironment{myfont}{\fontfamily{phv}\selectfont}{\par} %for setting the font
\usepackage{color}
\definecolor{light-gray}{gray}{0.45} % Just one number between 0 (black) and 1 (white)
\usepackage{titlesec}
\titleformat{\chapter}{\normalfont\large\bfseries\color{black}}{\thechapter.}{1 em}{}
\titleformat{\section}{\normalfont\normalsize\bfseries\color{black}}{\thesection.}{.5 em}{}
\titleformat{\subsection}{\normalfont\small\bfseries\color{black}}{\thesubsection.}{.3 em}{}
\usepackage{tikz}
\usepackage{lastpage}
\usepackage{etoolbox}
\makeatletter
\patchcmd{\chapter}{\if@openright\cleardoublepage\else\clearpage\fi}{}{}{}
\makeatother
\titlespacing*{\chapter}
{0 pt}{12 pt}{12 pt}
\usepackage{tabularx}
\renewcommand{\headrulewidth}{0 pt}
\setlength{\headheight}{0 pt}
\pagestyle{fancy}
\fancyhf{}
%\lhead{\textcolor{light-gray}{\large\textbf{\begin{myfont}Company Name Pvt. Ltd.\end{myfont}\textbf{}}}}
\rhead{\includegraphics[width=3.0 cm,keepaspectratio]{../IMAGES/Company_logo.jpg}}
\cfoot{Page \thepage\ of \pageref{LastPage}}
\usepackage[hidelinks]{hyperref}
\usepackage{multirow}
\hypersetup{pdfauthor={XYZ},%
            pdftitle={XYZ},%
            pdfsubject={XYZ},%
            pdfkeywords={XYZ, XYZ}
}

\begin{document}
\fancypagestyle{plain}{}

\chapter{PROJECT SUMMARY}

\section{PROJECT OVERVIEW}
\end{document}

A:

This seems to work, at least if the contents fits one page: the code is admittedly horrible.
\documentclass[11pt, openany, oneside]{book}
\usepackage{helvet}
\renewcommand{\familydefault}{\sfdefault}
\usepackage[paper=a4paper,margin=1.3 in]{geometry}% http://ctan.org/pkg/geometry
\usepackage[demo]{graphicx} % demo is just for the example
\usepackage{fancyhdr}
\usepackage[toc,page]{appendix}
\newenvironment{myfont}{\fontfamily{phv}\selectfont}{\par} %for setting the font
\usepackage{titlesec}
\titleformat{\chapter}{\normalfont\large\bfseries\color{black}}{\thechapter.}{1 em}{}
\titleformat{\section}{\normalfont\normalsize\bfseries\color{black}}{\thesection.}{.5 em}{}
\titleformat{\subsection}{\normalfont\small\bfseries\color{black}}{\thesubsection.}{.3 em}{}
\usepackage{tikz}
\usepackage{lastpage}
\usepackage{colortbl}
\usepackage{etoolbox}
\makeatletter
\patchcmd{\chapter}{\if@openright\cleardoublepage\else\clearpage\fi}{}{}{}
\makeatother
\titlespacing*{\chapter}
{0 pt}{12 pt}{12 pt}
\usepackage{tabularx}
\renewcommand{\headrulewidth}{0 pt}
\setlength{\headheight}{27pt}
\pagestyle{fancy}
\fancyhf{}
\lhead{\textcolor{light-gray}{\large\bfseries Company Name Pvt. Ltd.}}
%\rhead{\includegraphics[height=1cmwidth=3.0 cm]{../IMAGES/Company_logo.jpg}}
\cfoot{Page \thepage\ of \pageref{LastPage}}
\usepackage[hidelinks]{hyperref}
\usepackage{multirow}
\hypersetup{pdfauthor={XYZ},%
            pdftitle={XYZ},%
            pdfsubject={XYZ},%
            pdfkeywords={XYZ, XYZ}
}

\definecolor{light-gray}{gray}{0.85} % Just one number between 0 (black) and 1 (white)

\fancypagestyle{plain}{}

\begin{document}

\makeatletter
\renewcommand{\contentsline}[1]{\csname l@#1\endcsname}
\renewcommand{\l@chapter}[3]{%
  #1 & \hyperlink{#3}{#2} \\\hline
}
\renewcommand{\l@section}[3]{%
  \quad#1 & \hyperlink{#3}{#2} \\\hline
}
\renewcommand{\numberline}[1]{#1&}
\renewcommand\tableofcontents{%
  \chapter*{\contentsname
      \@mkboth{%
         \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}%
    \begingroup
    \makeatletter
    \IfFileExists{\jobname.toc}{%
      \noindent
      \begin{tabularx}{\textwidth}{|l|X|c|}
      \hline
      \rowcolor{light-gray}
      \multicolumn{1}{|c|}{NO.} & \multicolumn{1}{c|}{CONTENTS} & PAGE NO. \\\hline
      \@@input \jobname.toc
      \end{tabularx}%
    }{}%
    \if@filesw
      \expandafter\newwrite\csname tf@toc\endcsname
      \immediate\openout \csname tf@toc\endcsname \jobname.toc\relax
    \fi
    \@nobreakfalse
  \endgroup
}
\makeatother

\tableofcontents

\clearpage

\chapter{PROJECT SUMMARY}

\section{PROJECT OVERVIEW}
\section{PROJECT OVERVIEW}

\chapter{PROJECT SUMMARY}

\section{PROJECT OVERVIEW}
\section{PROJECT OVERVIEW}
\end{document}

A:

Edit See improved version below
This is some kind of a hack, redefining the \chapter, \section down to \subsubsection commands, which write an additional \jobname.tabletoc file. 
Remove the .tabletoc file after addition of new sections, this must improved later on, I will fix it.
The traditional \tableofcontents is still available.
It should also use a \longtable environment --> I will adjust later on.
There are certainly some other issues to be improved. 
The lines in the table seem to vanish, but this is a pdf viewer issue, at least with Acrobat Reader on Linux.
\documentclass[11pt, openany, oneside]{book}
\usepackage[english]{babel}
\usepackage{helvet}
\renewcommand{\familydefault}{\sfdefault}
\usepackage[paper=a4paper,margin=1.3 in]{geometry}% http://ctan.org/pkg/geometry
\usepackage[demo]{graphicx}
\usepackage{fancyhdr}
\usepackage[toc,page]{appendix}
\newenvironment{myfont}{\fontfamily{phv}\selectfont}{\par} %for setting the font
\usepackage{color}
\definecolor{light-gray}{gray}{0.45} % Just one number between 0 (black) and 1 (white)
\usepackage{titlesec}
\titleformat{\chapter}{\normalfont\large\bfseries\color{black}}{\thechapter.}{1 em}{}
\titleformat{\section}{\normalfont\normalsize\bfseries\color{black}}{\thesection.}{.5 em}{}
\titleformat{\subsection}{\normalfont\small\bfseries\color{black}}{\thesubsection.}{.3 em}{}
\usepackage{tikz}

\usepackage{lastpage}
\usepackage{etoolbox}
%%% My additions
\usepackage{xcolor}%
\usepackage{xstring}%
\usepackage{colortbl}%

\makeatletter
\patchcmd{\chapter}{\if@openright\cleardoublepage\else\clearpage\fi}{}{}{}
\makeatother
\titlespacing*{\chapter}
{0 pt}{12 pt}{12 pt}
\usepackage{tabularx}
\renewcommand{\headrulewidth}{0 pt}
\setlength{\headheight}{0 pt}
\pagestyle{fancy}
\fancyhf{}
%\lhead{\textcolor{light-gray}{\large\textbf{\begin{myfont}Company Name Pvt. Ltd.\end{myfont}\textbf{}}}}
\rhead{\includegraphics[width=3.0 cm,keepaspectratio]{../IMAGES/Company_logo.jpg}}
\cfoot{Page \thepage\ of \pageref{LastPage}}%
\usepackage{multirow}%

\usepackage[hidelinks]{hyperref}%
\hypersetup{pdfauthor={XYZ},%
            pdftitle={XYZ},%
            pdfsubject={XYZ},%
            pdfkeywords={XYZ, XYZ}
}%

\newwrite\TableTOCFile 

\AtBeginDocument{%
\redefinesectioning{chapter}%
\redefinesectioning{section}%
\redefinesectioning{subsection}%
\redefinesectioning{subsubsection}%

\IfFileExists{\jobname.tabletoc}{}{%
\immediate\openout\TableTOCFile=\jobname.tabletoc%
}%
}%

\AtEndDocument{%
\immediate\closeout\TableTOCFile
}%

\newcommand{\mk}[1]{%

}%

\makeatletter

\let\LaTeXStandardchapter\chapter%
\let\LaTeXStandardsection\section%
\let\LaTeXStandardsubsection\subsection%
\let\LaTeXStandardsubsubsection\subsubsection%

\newcommand{\redefinesectioning}[1]{%

\csgdef{unstarred#1@@noopt}##1{%
\@nameuse{unstarred#1@@opt}[##1]{##1}%
}%

\csgdef{unstarred#1@@opt}[##1]##2{%
\csname LaTeXStandard#1\endcsname[##1]{##2}%
\IfStrEq{#1}{chapter}{%
\immediate\write\TableTOCFile{%\
\csname the#1\endcsname & & & & ##1 & \thepage \tabularnewline^^J
\string\hline%
}%
}{%
  \IfStrEq{#1}{section}{%
    \immediate\write\TableTOCFile{%
      & \csname the#1\endcsname & & & ##1 & \thepage \tabularnewline^^J
      \string\hline%
    }%
  }{%
    \IfStrEq{#1}{subsection}{%
      \immediate\write\TableTOCFile{%
        & & \csname the#1\endcsname & & ##1 & \thepage \tabularnewline^^J
        \string\hline%
      }%
    }{
    \IfStrEq{#1}{subsubsection}{%
      \immediate\write\TableTOCFile{%
        & & & \csname the#1\endcsname  & ##1 & \thepage \tabularnewline^^J
        \string\hline%
      }%
      }{}
    }%
  }}%
}%

\csgdef{starred#1@@noopt}##1{%
\csname LaTeXStandard#1\endcsname*{##1}%
}%

\csgdef{starred#1@@opt}[##1]##2{%
\csname LaTeXStandard#1\endcsname*{##2}%
% Optional argument will be handled here....
}%

\csgdef{starred#1}{%
\@ifnextchar[{\@nameuse{starred#1@@opt}}{\@nameuse{starred#1@@noopt}}%
}%

\csgdef{unstarred#1}{%
\@ifnextchar[{\@nameuse{unstarred#1@@opt}}{\@nameuse{unstarred#1@@noopt}}%
}%

\ifcsdef{#1}{%
\long\csgdef{#1}{%
\@ifstar{\@nameuse{starred#1}}{\@nameuse{unstarred#1}}%
}%
}{}%

}%

\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}

\newlength{\tocsectioncolumnwidth}
\setlength{\tocsectioncolumnwidth}{0.08\textwidth}%

\newcommand{\Tableofcontents}{%
\IfFileExists{\jobname.tabletoc}{%
\chapter*{\contentsname}%
\begin{tabular}{|*{4}{p{\tocsectioncolumnwidth}@{}}|p{0.5\textwidth}|c|}
\hline
\multicolumn{4}{|c|}{\cellcolor{lightgray}\textbf{NO.}} & \multicolumn{1}{|c|}{\cellcolor{lightgray}\textbf{CONTENTS}} & \cellcolor{lightgray}\textbf{PAGE} \tabularnewline
\hline
\input{\jobname.tabletoc}%
\end{tabular}
}{}%
\cleardoublepage%
}

\begin{document}

%Traditional TOC
\tableofcontents%

% 'new' TOC
\Tableofcontents

\fancypagestyle{plain}{}

\chapter[other]{First}

\section{First section}%

\chapter[Second short title]{Second short}

\section{Some Section}%

\chapter{Summary}%

\section{Another section}

\subsection{Some subsection}
\subsubsection{Yet another sectioning level}%

\end{document}

Note Some more explanations will follow.

UPDATE
This version is definitely better than the first posted one. It is a long table now and should principally work for sectioning commands from \chapter down to \subparagraph, however, the column spacing in the spacing is still wrong. The toc content entries are hyperlinks now. 
\documentclass[11pt, openany, oneside]{book}
\usepackage[english]{babel}
\usepackage{helvet}
\renewcommand{\familydefault}{\sfdefault}
\usepackage[paper=a4paper,margin=1.3 in]{geometry}% http://ctan.org/pkg/geometry
\usepackage[demo]{graphicx}
\usepackage{fancyhdr}
\usepackage[toc,page]{appendix}
\newenvironment{myfont}{\fontfamily{phv}\selectfont}{\par} %for setting the font
\usepackage{color}
\definecolor{light-gray}{gray}{0.45} % Just one number between 0 (black) and 1 (white)
\usepackage{titlesec}
\titleformat{\chapter}{\normalfont\large\bfseries\color{black}}{\thechapter.}{1 em}{}
\titleformat{\section}{\normalfont\normalsize\bfseries\color{black}}{\thesection.}{.5 em}{}
\titleformat{\subsection}{\normalfont\small\bfseries\color{black}}{\thesubsection.}{.3 em}{}

\usepackage{tikz}

\usepackage{lastpage}
\usepackage{etoolbox}
%%% My additions
\usepackage{longtable}%
\usepackage{forloop}%
\usepackage{xcolor}%
\usepackage{xstring}%
\usepackage{colortbl}%

\makeatletter
\patchcmd{\chapter}{\if@openright\cleardoublepage\else\clearpage\fi}{}{}{}
\makeatother
\titlespacing*{\chapter}
{0 pt}{12 pt}{12 pt}
\usepackage{tabularx}
\renewcommand{\headrulewidth}{0 pt}
\setlength{\headheight}{0 pt}
\pagestyle{fancy}
\fancyhf{}
%\lhead{\textcolor{light-gray}{\large\textbf{\begin{myfont}Company Name Pvt. Ltd.\end{myfont}\textbf{}}}}
\rhead{\includegraphics[width=3.0 cm,keepaspectratio]{../IMAGES/Company_logo.jpg}}
\cfoot{Page \thepage\ of \pageref{LastPage}}%
\usepackage{multirow}%

\usepackage[hidelinks]{hyperref}%
%\usepackage{hyperref}%
\hypersetup{pdfauthor={XYZ},%
            pdftitle={XYZ},%
            pdfsubject={XYZ},%
            pdfkeywords={XYZ, XYZ}
}%

\newcommand{\ifnumgreaterequal}[4]{%
  \ifnumgreater{#1}{#2}{#3}{%
    \ifnumequal{#1}{#2}{#3}{#4}}%
}%

\newcounter{NumberOfRuns}%

\newwrite\TableTOCFile

\makeatletter

\newcounter{tabletoc@@tocdepth}%
\setcounter{tocdepth}{4}%

\newcommand{\RedefineSectioningCommands}{%
\listgadd{\SectioningList}{}%
\forcsvlist{\listgadd{\SectioningList}}{part,chapter,section,subsection,subsubsection,paragraph,subparagraph}%
\forlistloop{\letallsectioning}{\SectioningList}%
\forlistloop{\redefinesectioning}{\SectioningList}%
}%

\AtBeginDocument{%
%
\RedefineSectioningCommands%
\setcounter{tabletoc@@tocdepth}{\number\value{tocdepth}}%
\addtocounter{tabletoc@@tocdepth}{1}%

\IfFileExists{\jobname.tabletoc}{}{%
  \immediate\openout\TableTOCFile=\jobname.tabletoc%
}%
}%

\AtEndDocument{%
\refstepcounter{NumberOfRuns}%
\immediate\closeout\TableTOCFile
% Not used so far...
\immediate\write\@auxout{%
\string\setcounter{NumberOfRuns}{\number\value{NumberOfRuns}}
}

}%

\makeatother

\makeatletter

\newcommand{\letallsectioning}[1]{%
\csletcs{LaTeXStandard#1}{#1}%
}%

\newcommand{\ch@@part@@level}{-1}%
\newcommand{\ch@@chapter@@level}{0}%
\newcommand{\ch@@section@@level}{1}%
\newcommand{\ch@@subsection@@level}{2}%
\newcommand{\ch@@subsubsection@@level}{3}%
\newcommand{\ch@@paragraph@@level}{4}%
\newcommand{\ch@@subparagraph@@level}{5}%

\newcounter{loop@@counter}%

\newcommand{\writeatcorrectposition}[2]{%
% 1st arg: counter value
% 2nd arg: section level
% 3rd arg: number of columns
  \forloop{loop@@counter}{0}{\number\value{loop@@counter} < \number\value{tabletoc@@tocdepth}}{%
    \ifnumequal{\number\value{loop@@counter}}{\csname ch@@#2@@level\endcsname}{%
      #1 &}{%
      &}%
     }%
}%

\newcommand{\redefinesectioning}[1]{%

\csgdef{unstarred#1@@noopt}##1{%
\@nameuse{unstarred#1@@opt}[##1]{##1}%
}%

\csgdef{unstarred#1@@opt}[##1]##2{%
\csname LaTeXStandard#1\endcsname[##1]{##2}%
\phantomsection%
\hypertarget{sectionunit::\csname the#1\endcsname}{}%%
\ifblank{##1}{%
% Don't write a toc entry
}{%  
  \ifnumgreaterequal{\csname ch@@#1@@level\endcsname}{\number\value{tabletoc@@tocdepth}}{}{%
    \immediate\write\TableTOCFile{%
      \string\writeatcorrectposition{\csname the#1\endcsname}{#1} 
      \string\hyperlink{sectionunit::\csname the#1\endcsname}{##1} & \thepage \tabularnewline^^J
      \string\hline^^J
    }% End of \immediate\write
  }% End of \ifnumgreaterequal%
}% End of \ifblank
}%

\csgdef{starred#1@@noopt}##1{%
\csname LaTeXStandard#1\endcsname*{##1}%
}%

\csgdef{starred#1@@opt}[##1]##2{%
\csname LaTeXStandard#1\endcsname*{##2}%
% Optional argument will be handled here....
}%

\csgdef{starred#1}{%
\@ifnextchar[{\@nameuse{starred#1@@opt}}{\@nameuse{starred#1@@noopt}}%
}%

\csgdef{unstarred#1}{%
\@ifnextchar[{\@nameuse{unstarred#1@@opt}}{\@nameuse{unstarred#1@@noopt}}%
}%

\ifcsdef{#1}{%
\long\csgdef{#1}{%
\@ifstar{\@nameuse{starred#1}}{\@nameuse{unstarred#1}}%
}%
}{}%

}%

\setcounter{secnumdepth}{3}

\newlength{\tocsectioncolumnwidth}
\setlength{\tocsectioncolumnwidth}{0.08\textwidth}%

\newcommand{\Tableofcontents}{%
\setcounter{tabletoc@@tocdepth}{\number\value{tocdepth}}%
\addtocounter{tabletoc@@tocdepth}{1}%

\IfFileExists{\jobname.tabletoc}{%

\typeout{There are \number\value{tabletoc@@tocdepth} columns}%
\chapter*{\contentsname}%
\begin{longtable}{|*{\number\value{tabletoc@@tocdepth}}{p{\tocsectioncolumnwidth}@{}}|p{0.5\textwidth}|c|}
\hline
\multicolumn{\number\value{tabletoc@@tocdepth}}{|c|}{\cellcolor{light-gray}\textbf{NO.}} & \multicolumn{1}{|c|}{\cellcolor{light-gray}\textbf{CONTENTS}} & \cellcolor{light-gray}\textbf{PAGE} \tabularnewline
\hline
\input{\jobname.tabletoc}%
\end{longtable}
}{}%
\cleardoublepage%
}

\begin{document}

\setcounter{tocdepth}{3}

%Traditional TOC
\tableofcontents%

% 'new' TOC
\Tableofcontents

\fancypagestyle{plain}{}

\chapter[First]{First Chapter}

\section{First section}%

\chapter[Second short title]{Second Chapter}

\section{Some Section}%

\chapter{Summary}%

\section{Another section of Summary and a very long title}

\subsection{Some subsection}
\subsubsection{Yet another sectioning level}%

\chapter{Other Chapter with $\int\limits_{a}^{b}$}%

\end{document}

