Thanks to this post Longtable with threeparttable (but the one that I can't comment because I'm really new here) I found that I can use footnotes with longtable, if I use threeparttable package.
However, I'd like to have a line above my notes. Anyone know how to do it? (I want something like this)
Here it's an example of my code. The table 1 (longtable) is the one that have footnotes with ThreePartTable package. It hasn't line above the notes. The table 2 (with minipage environment) has line above the notes. I want a similar line in table 1.
\documentclass[a4paper]{article}
\usepackage{longtable}
\usepackage{multirow}
\usepackage{lipsum}
\usepackage{booktabs,threeparttablex}
\usepackage{etoolbox}
\appto\TPTnoteSettings{\footnotesize}
\usepackage{caption}
\usepackage[labelfont=bf,labelsep=period]{caption}
\begin{document}
\lipsum[2-3]
\begin{ThreePartTable}
\renewcommand\TPTminimum{\textwidth}
\setlength\LTleft{0pt}
\begin{TableNotes}
\item[*] A note adsfasdf
\item[] Another note asdfasfasd
\end{TableNotes}
\begin{longtable}{|l|l|l|l|l|l|}
\caption{\textit{AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA}} \
\hline
\textbf{Col1} & \textbf{Col2} & \textbf{Col3\tnote{}} & \textbf{Col4} & \textbf{Col5} & \textbf{Col6\tnote{}} \
\hline
\endfirsthead
\multicolumn{6}{l}{\tablename\ \thetable:
\textit{AAAAAAAAAAAAAAA}(Cont\ldots)}\
\hline
\textbf{Col1} & \textbf{Col2} & \textbf{Col3} & \textbf{Col4} & \textbf{Col5} & \textbf{Col6} \
\hline
\endhead
\hline \multicolumn{6}{l}{}\
\endfoot
\insertTableNotes
\endlastfoot
\multirow{3}{}{23412} & AAAA & A & AAAAAAA & AAAAAAA & A \
& AAAA & A & AAAAAAA & AAAAAAA & A \
& AAAA & A & AAAAAAA & AAAAAAA & A \
\hline
\multirow{3}{}{23412} & AAAA & A & AAAAAAA & AAAAAAA & A \
& AAAA & A & AAAAAAA & AAAAAAA & A \
& AAAA & A & AAAAAAA & AAAAAAA & A \
\hline
\multirow{3}{}{23412} & AAAA & A & AAAAAAA & AAAAAAA & A \
& AAAA & A & AAAAAAA & AAAAAAA & A \
& AAAA & A & AAAAAAA & AAAAAAA & A \
\hline
\multirow{3}{}{23412} & AAAA & A & AAAAAAA & AAAAAAA & A \
& AAAA & A & AAAAAAA & AAAAAAA & A \
& AAAA & A & AAAAAAA & AAAAAAA & A \
\hline
\multirow{3}{}{23412} & AAAA & A & AAAAAAA & AAAAAAA & A \
& AAAA & A & AAAAAAA & AAAAAAA & A \
& AAAA & A & AAAAAAA & AAAAAAA & A \
\hline
\multirow{3}{}{23412} & AAAA & A & AAAAAAA & AAAAAAA & A \
& AAAA & A & AAAAAAA & AAAAAAA & A \
& AAAA & A & AAAAAAA & AAAAAAA & A \
\hline
\multirow{3}{}{23412} & AAAA & A & AAAAAAA & AAAAAAA & A \
& AAAA & A & AAAAAAA & AAAAAAA & A \
& AAAA & A & AAAAAAA & AAAAAAA & A \
\hline
\multirow{3}{}{23412} & AAAA & A & AAAAAAA & AAAAAAA & A \
& AAAA & A & AAAAAAA & AAAAAAA & A \
& AAAA & A & AAAAAAA & AAAAAAA & A \
\hline
\multirow{3}{}{23412} & AAAA & A & AAAAAAA & AAAAAAA & A \
& AAAA & A & AAAAAAA & AAAAAAA & A \
& AAAA & A & AAAAAAA & AAAAAAA & A \
\hline
\multirow{3}{}{23412} & AAAA & A & AAAAAAA & AAAAAAA & A \
& AAAA & A & AAAAAAA & AAAAAAA & A \
& AAAA & A & AAAAAAA & AAAAAAA & A \
\hline
\multirow{3}{}{23412} & AAAA & A & AAAAAAA & AAAAAAA & A \
& AAAA & A & AAAAAAA & AAAAAAA & A \
& AAAA & A & AAAAAAA & AAAAAAA & A \
\hline
\multirow{3}{}{23412} & AAAA & A & AAAAAAA & AAAAAAA & A \
& AAAA & A & AAAAAAA & AAAAAAA & A \
& AAAA & A & AAAAAAA & AAAAAAA & A \
\hline
\multirow{3}{}{23412} & AAAA & A & AAAAAAA & AAAAAAA & A \
& AAAA & A & AAAAAAA & AAAAAAA & A \
& AAAA & A & AAAAAAA & AAAAAAA & A \
\hline
\end{longtable}
\end{ThreePartTable}
\begin{table}[!ht]
\centering
\caption{AAAAAAAAAAAAAAAAAAAA}
\begin{minipage}{\textwidth}
\renewcommand*{\thempfootnote}{\fnsymbol{mpfootnote}}
\begin{tabular}{|l|l|l|l|l|l|}
\hline
\textbf{Col1} & \textbf{Col2} & \textbf{Col3\footnote[1]{A note adsfasdf}} & \textbf{Col4} & \textbf{Col5} & \textbf{Col6\footnote[0]{Another note asdfasfasd}} \
\hline
AAAAAA & AAAAAA & A & AAAAAA & AAAAAA & A \
\hline
AAAAAA & AAAAAA & A & AAAAAA & AAAAAA & A \
\hline
AAAAAA & AAAAAA & A & AAAAAA & AAAAAA & A \
\hline
AAAAAA & AAAAAA & A & AAAAAA & AAAAAA & A \
\hline
\end{tabular}
\end{minipage}
\end{table}
\end{document}
Thanks in advance!

\endlastfootsection). Unless you want a second rule, or so I misunderstand the problem? – Bernard Aug 26 '20 at 16:46\endfoot \insertTableNotes \endlastfoot– emr2 Aug 26 '20 at 16:56\bottomrulebefore\insertTableNotesif you usebooktabs, or simply\hline` if you don't ( or any rule from another package – makecell, boldline,…) – Bernard Aug 26 '20 at 17:04\bottomruleworks but, it's too long and too near to the table. Do you know if I can put a line like if I were using minipage environment? Like this https://i.stack.imgur.com/EpYSq.png – emr2 Aug 26 '20 at 17:14\cmidrule{1-1}in order to get a narrower horizontal line. What to do depends a lot on the actual table. – leandriis Aug 26 '20 at 18:37\addlinespace[3ex], for instance. If you want a rule at you convenience, you use\noalign{\rule{somelength}{some height}. Furthermore, the vertical spacing can be incorporated to the optional argument of \rule (e.g.\noalign{\rule[-3ex]{4cm}{0.4pt}}). – Bernard Aug 26 '20 at 19:38\noalign {\rule [-1.4ex]{6.7cm}{0.4pt}}problem solved! Should I write this as an answer of this post? Or do you have to write it? Thanks very much!!! – emr2 Aug 27 '20 at 10:23