One could insert content into the ToC mid-document that would influence the way the ToC is printed. For that I've created two macros:
\stoptocwriting
Set the counter tocdepth
to -5, where no sectional heading level exists above. As such, entries following this macro will be dropped with the ToC altogether;
\resumetocwriting
Resets the counter of tocdepth
to whatever it was set at in the preamble. This restores the ToC entries style of display.
Here is a minimal example showing the use of the above macros:

\documentclass{report}
\usepackage[toc,page]{appendix}
\newcommand{\stoptocwriting}{%
\addtocontents{toc}{\protect\setcounter{tocdepth}{-5}}}
\newcommand{\resumetocwriting}{%
\addtocontents{toc}{\protect\setcounter{tocdepth}{\arabic{tocdepth}}}}
\begin{document}
\tableofcontents
\chapter{Chapter 1}
\section{Section 1.1}
\subsection{Section 1.1.1}
\chapter{Chapter 2}
\section{Section 2.1}
\subsection{Section 2.1.1}
\appendix
\chapter{Appendix A}
\stoptocwriting
\section{Appendix A.1} % Do not show in table of content.
\subsection{Appendix A.1.1} % Do not show in table of content.
\resumetocwriting
\chapter{Appendix B}
\stoptocwriting
\section{Appendix B.1} % Do not show in table of content.
\section{Appendix B.2} % Do not show in table of content.
\resumetocwriting
\end{document}
The .toc
contains all the original entries, together with the setting of tocdepth
:
\contentsline {chapter}{\numberline {1}Chapter 1}{2}
\contentsline {section}{\numberline {1.1}Section 1.1}{2}
\contentsline {subsection}{\numberline {1.1.1}Section 1.1.1}{2}
\contentsline {chapter}{\numberline {2}Chapter 2}{3}
\contentsline {section}{\numberline {2.1}Section 2.1}{3}
\contentsline {subsection}{\numberline {2.1.1}Section 2.1.1}{3}
\contentsline {chapter}{\numberline {A}Appendix A}{4}
\setcounter {tocdepth}{-5}
\contentsline {section}{\numberline {A.1}Appendix A.1}{4}
\contentsline {subsection}{\numberline {A.1.1}Appendix A.1.1}{4}
\setcounter {tocdepth}{0}
\contentsline {chapter}{\numberline {B}Appendix B}{5}
\setcounter {tocdepth}{-5}
\contentsline {section}{\numberline {B.1}Appendix B.1}{5}
\contentsline {section}{\numberline {B.2}Appendix B.2}{5}
\setcounter {tocdepth}{0}