emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Fraga, Eric" <e.fraga@ucl.ac.uk>
To: "edgar@openmail.cc" <edgar@openmail.cc>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: how to concatenate string to spreadsheet formula
Date: Mon, 15 Aug 2022 14:40:15 +0000	[thread overview]
Message-ID: <87o7wlbmeo.fsf@ucl.ac.uk> (raw)
In-Reply-To: <20220815135059.Horde.0yrWgPRhFF6o7SxGXFD4fgW@www.vfemail.net> (edgar@openmail.cc's message of "Mon, 15 Aug 2022 13:50:59 +0000")

Hi Edgar,

I did not quite understand what you actually were calculating but maybe
consider the following expression for table formulas:

#+TBLFM: $3='(format "%s\\textwidth" (/ (* 1.0 $2) $1));N

If you specify ";N", the entries are treated as numbers.  The problem
with division is that if both numbers are integers, integer division is
used so I multiply one of the arguments by 1.0 to ensure floating point
numbers.

HTH,
eric

-- 
: Eric S Fraga, with org release_9.5.4-720-g4db67d in Emacs 29.0.50

  reply	other threads:[~2022-08-15 14:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-15 13:50 how to concatenate string to spreadsheet formula edgar
2022-08-15 14:40 ` Fraga, Eric [this message]
2022-08-16  8:22   ` edgar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o7wlbmeo.fsf@ucl.ac.uk \
    --to=e.fraga@ucl.ac.uk \
    --cc=edgar@openmail.cc \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).