Build a LaTex table from a Dataset

Hi everybody!

Is it possible to turn a Dataset object into a Tex expression?
One can easily build a dataset fom an Excel file:

Tableau = SemanticImport["UneFeuille.xlsx", Automatic];

Right, but :

Export[Tableau, "TeXFragment"]

for example, doesn’t work. What should i do?
Thanks a lot,

Claude

UneFeuille.xlsx (11.4 KB)

Dataset can wrap up a lot of things, but if you have a simple List of Lists inside, you can just do the following and get a Latex array.

Query[TeXForm][Dataset[RandomInteger[{1, 10}, {20, 2}]]]

You can also write out a full TeX document as follows:

Query[TeXForm /* (ExportString[#, "TeX"] &)][
 Dataset[RandomInteger[{1, 10}, {20, 2}]]]

And you can always use Export with a filename instead of ExportString to write out the TeX to a file.

If your Dataset is wrapping something more complicated such as a List of Associations or Association of Associations, I am not sure how TeXForm is going to work. For example, the code below “works” but I don’t know enough TeX to know if the output is meaningful.

Query[(1 ;; 5) /* TeXForm][ExampleData[{"Dataset", "Titanic"}]]