Re: simulare un foglio excel

#78599
claudio
Partecipante
    Up
    0
    Down
    ::


    ed ecco il risultato finale
    non è bello ma..

    `
    % !TEX TS-program = pdflatex
    % !TEX encoding = UTF-8 Unicode
    \documentclass{article}
    \usepackage{array}

    \newcolumntype{C}[1]{>{\centering}p{#1}}
    % oppure senza argomento
    % \newcolumntype{C}{>{\centering}p{20mm}}
    \newcolumntype{M}[1]{>{\centering\rule[-3mm]{0pt}{8mm}}m{#1}}
    \newcolumntype{N}[1]{>{\centering\rule[-1mm]{0pt}{2mm}}m{#1}}

    \begin{document}

    %\begin{tabular}{@{}|M{6mm}|*5{M{22.6mm}|}@{}}
    % oppure
    %\begin{tabular}{*5C}
    \begin{tabular}{l}
    %\setlength{\arrayrulewidth}{2pt}
    \begin{tabular}{@{}|N{6mm}|N{18mm}|*2{N{24.6mm}|}*2{N{10.6mm}|} }%{|C{6mm}|*5{C{22.6mm}|}@{}}
    \hline
    &A &B &C &D&E\tabularnewline

    \end{tabular}\\
    \begin{tabular}{@{}|M{6mm}|M{18mm}|*2{M{24.6mm}|}*2{M{10.6mm}|} @{}}
    % oppure
    \hline
    1& $x_i$ & $n_i$ & $x_i\cdot n_i$ &&\tabularnewline
    \hline
    2& 6 & 8 & =A2*B2 &M=&=C6/B6 \tabularnewline
    \hline
    3& 3 & 6 & =A3*B3 && \tabularnewline
    \hline
    4&4 & 5 & =A4*B4 && \tabularnewline
    \hline
    5&5 & 3 & =A5*B5 && \tabularnewline
    \hline
    6&Totali & =somma(B2:B5) & =somma(B2:B5) && \tabularnewline
    \hline
    \end{tabular}\\
    \end{tabular}
    \end{document}
    `

    claudio

    Go to top