Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I tried the following,

\documentclass[a4paper,12pt]{article}
\usepackage[inner=0.75in,outer=0.65in,top=0.75in,bottom=0.65in]{geometry}
\usepackage{multirow}
\usepackage{spreadtab}
%\usepackage[sc]{mathpazo}
%\usepackage[onehalfspacing]{setspace}

\begin{document}

\begin{table}[htp]
 \centering
 \caption{Sample} \vspace{3pt}
 \begin{spreadtab}{{tabular}{|c|l|l|c|c|c|c|c|c|}}
  \hline
   @\multirow{2}{*}{Sl No.} &
   @\multicolumn{2}{c}{\multirow{2}{*}{\textbf{something}}} &
  @\multicolumn{4}{|c|}{\textbf{s}} & @\textbf{a~/~b} &
  @\multirow{2}{*}{\textbf{Total}} \\
  \cline{4-7}
  & @\multicolumn{2}{|c|}{} & @\textbf{x} & @\textbf{y} & @\textbf{z}
  & @\textbf{m} & @\textbf{/~c} & \\ 
  \hline
  @\multirow{3}{*}{1} & @\multirow{2}{*}{1.1} & @x & 2 & 3 & 2 & 1 & 3 &
  \STcopy{v}{d3+e3+f3+g3+h3}
  \\ \cline{3-9}
   & & @y &  & 6 & 32 &  & 45 &
  \\
  \cline{2-9}
   & \multicolumn{2}{|l|}{@\textbf{Sub Total}} & 
  {\fontseries{b}\selectfont}\STcopy{>}{d3+d4} & \textbf{:={}} & \textbf{:= {}} 
  &\textbf{:={}}  &\textbf{:={}} & \textbf{:={}} \\ \hline
  @\multirow{2}{*}{2} & @\multirow{2}{*}{1.2} & @z &6 &3 &5 & 1 & 3&
  \\
   \cline{3-9}
   &  & @k & 61 & 53 &  & 18 & 39 &
   \\
  \cline{2-9}
   & \multicolumn{2}{|l|}{@\textbf{Sub Total}}  & 
  {\fontseries{b}\selectfont}\STcopy{>}{d6+d7} & \textbf{:={}} & \textbf{:={}} 
  &\textbf{:={}}  &\textbf{:={}} & \textbf{:={}}\\ \hline \hline
  @\multicolumn{1}{|c}{} & @\multicolumn{2}{l|}{\textbf{Total}} & 
  {\fontseries{b}\selectfont}\STcopy{>}{d5+d8}  & \textbf{:={}} & \textbf{:={}} 
   &\textbf{:={}}  &\textbf{:={}} & \textbf{:={}}\\ \hline 
  \end{spreadtab}
  \end{table}

   \end{document}

I have left some elements as blank, so as to check if I will that will be taken as zero during computation as I don't want zero to be displayed in the table.

  • I am getting the following error ,'You can't use '\end' in internal vertical mode \end{spreadtab}' Is there a solution?
  • When using floating points for computation with spreadtab, is there any way to output a specified number of digits after the decimal place, for uniformity.
share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.