Hello Pascal,
Did you have a look to the following post (don’t pay attention to the title, it is about LaTeX export of tables): Export a table to a file - #3 by mottelet ? You should be able to reuse the code to generate LaTeX markup for an arbitrary table.
S.