# How does spreadtab know it is a number?

Using spreadtab with glossaries I define a glossary entry A with a field user1=12. Now, if I call this field in a spreadtab table with \glsentryuseri{A}, spreadtab does not recognize it as a number. Could I convince spreadtab somehow that it is a number?

-
Would you please add a minimal example? –  egreg May 26 '11 at 11:23
@egreg: \newglossaryentry{A}{name={foo}, user1=12} and then something like \begin{spreadtab}{{tabular}{ll}} \glsentryuseri{A}&1\\ \end{spreadtab} –  leh May 26 '11 at 11:43
Please, add the code for a minimal compilable example to your question; there should be also the names of the packages to load –  egreg May 26 '11 at 16:42

It seems that spreadtab chokes on macros with arguments. To get around this, you can just store the value inside a macro without an argument by using

\newcommand{\glsentryuseriA}{\glsentryuseri{A}}


and it will work. Here's the complete code:

\documentclass{article}

\usepackage{glossaries}

\makeglossaries

\newglossaryentry{A}{name={foo}, user1=12}
\newcommand{\glsentryuseriA}{\glsentryuseri{A}}

\begin{document}


@leh: try contacting the author of spreadtab. I have seen him on this site, so probably he just hasn't seen your question. –  Philippe Goutet Jun 21 '11 at 23:28