pgfkeys / pgfplotstable: How to get (and save) row- and column-number of a cell with special content

I have a cell with special content, say 'x'.
I could find 'x' with string replace.
But how can I get and save the row- and the column-number of that cell? With \pgfplotstablerow and \pgfplotstablecol?

\documentclass[]{article}
\usepackage{pgfplotstable}
a, b, c
d, e, f
g, x, i
j, k, l
}\mytable

\begin{document}
\pgfplotstabletypeset[
string replace={x}{x
%\pgfkeysgetvalue{\pgfplotstablerow}{\rowno} % works not
%\pgfkeysgetvalue{\pgfplotstablecol}{\colno} % not that easy
}
]{\mytable}

x is in row no. ? and column no. ?
\end{document}

• What is your purpose with these two numbers?
– user213378
Aug 16, 2020 at 19:55
• Good question. The idea is to use these number for highlight rows / cols ( tex.stackexchange.com/questions/557748/… ). I tried to use @Henri Menke solution there without succes.
– cis
Aug 17, 2020 at 18:26

This is pretty close to a duplicate of this question of yours on TeXwelt, even though you never accepted my answer:

pgfplotstable: Auf 'column name' mit 'pgfkeysgetvalue' zugreifen

https://texwelt.de/fragen/23473

At least in my answer I showed the principle of how this could be done in general, so it comes as no surprise that I will again use postproc cell content to access the cell content to perform the comparison.

\documentclass[]{article}
\usepackage{pgfplotstable}
a, b, c
d, e, f
g, x, i
j, k, l
}\mytable

\def\literalx{x}

\begin{document}
\pgfplotstabletypeset[
postproc cell content/.code={%
\def\temp{#1}%
\ifx\temp\literalx
\xdef\remembercol{\pgfplotstablecol}%
\xdef\rememberrow{\pgfplotstablerow}%
\fi
}]{\mytable}

x is in row no.~\rememberrow\ and column no.~\remembercol.
\end{document}