Export a table to a file

Hello Philipp,

For this kind of stuff, a possible way to go is to use LaTeX and the tabular environment. Here is a small example:

t = table(rand(5,3,"normal"), ...
    "VariableNames",["var1Name","var2Name","myLongVarName"])

[n,m] = size(t);
head = strcat("\bf "+t.props.VariableNames,"&") + "\\"
data = strcat(strcat(string(t),"&","c"),"\\")
str = [ sprintf("\\sf\\begin{tabular}{%s}",strcat("r"(ones(1,m)),"|"))
        head; "\hline"; data; "\end{tabular}" ];

h = xstringb(0,0,strcat(str,ascii(10)),1,1,"fill");
h.interpreter = "latex";
xs2pdf(gcf(),"table.pdf")

Here is the output in a Scilab figure (the pdf looks strictly the same):
table