From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Using numbers w/ commas in spreadsheets? Date: Wed, 3 Sep 2008 09:03:48 +0200 Message-ID: <552EEEB8-3F84-46E4-AF13-83DFE5A542E6@uva.nl> References: <9E067A1AECCB154485D4CF7E4BEF4D8E097A1E3B@post07.corp.seic.com> Mime-Version: 1.0 (Apple Message framework v926) Content-Type: multipart/mixed; boundary="===============2089993089==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KamPF-0006OF-Ng for emacs-orgmode@gnu.org; Wed, 03 Sep 2008 03:03:57 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KamPF-0006Ng-5L for emacs-orgmode@gnu.org; Wed, 03 Sep 2008 03:03:57 -0400 Received: from [199.232.76.173] (port=59095 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KamPE-0006NT-Ov for emacs-orgmode@gnu.org; Wed, 03 Sep 2008 03:03:56 -0400 Received: from mx20.gnu.org ([199.232.41.8]:56330) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KamPD-0003mh-3r for emacs-orgmode@gnu.org; Wed, 03 Sep 2008 03:03:55 -0400 Received: from ug-out-1314.google.com ([66.249.92.174]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KamPC-0001Ks-3z for emacs-orgmode@gnu.org; Wed, 03 Sep 2008 03:03:54 -0400 Received: by ug-out-1314.google.com with SMTP id m2so2412539uge.17 for ; Wed, 03 Sep 2008 00:03:53 -0700 (PDT) In-Reply-To: <9E067A1AECCB154485D4CF7E4BEF4D8E097A1E3B@post07.corp.seic.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "Parker, Matthew" Cc: emacs-orgmode@gnu.org --===============2089993089== Content-Type: multipart/alternative; boundary=Apple-Mail-4--547423756 --Apple-Mail-4--547423756 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit On Aug 27, 2008, at 6:18 AM, Parker, Matthew wrote: > Is it possible to work w/ numbers w/ commas in 'spreadsheets'? No, this is not possible. - Carsten > > when trying to add 3,000 to 4,000 below... > =$1+$2 > ... yields 7 > > and this works but is long winded: > @2$3='(+ (string-to-number (replace-regexp-in-string "," "" $1)) > (string-to-number (replace-regexp-in-string "," "" $2)) ) > > I reviewed the chapter on tables... am I missing something simple? > > Thanks > > | one | two | sum | > |---------+---------+-----------------------| > | 3000 | 4000 | 7000 | > | 3,000 | 4,000 | 7 | > | 3,000 | 4,000 | 7000 | > | "3,000" | "4,000" | [103, 88, 96, 96, 96] | > | 3\,000 | 4\,000 | #ERROR | > | '3,000' | '4,000' | #ERROR | > #+TBLFM: @2$3='(+ (string-to-number (replace-regexp-in-string "," "" > $1)) (string-to-number (replace-regexp-in-string "," "" $2)) )::@3$3= > $1+$2 > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode --Apple-Mail-4--547423756 Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable
On Aug 27, 2008, = at 6:18 AM, Parker, Matthew wrote:

  @2$3=3D'(+ (string-to-number = (replace-regexp-in-string "," "" $1)) (string-to-number = (replace-regexp-in-string "," "" $2)) = )
| 3000    | = 4000    | = 7000           &nbs= p;      |
| 3,000   | 4,000   | = 7            &= nbsp;        = |
| "3,000" | "4,000" | [103, 88, 96, 96, = 96] |
| '3,000' | '4,000' | = #ERROR           &n= bsp;    |
#+TBLFM: @2$3=3D'(+ (string-to-number = (replace-regexp-in-string "," "" $1)) (string-to-number = (replace-regexp-in-string "," "" $2)) = )::@3$3=3D$1+$2
Emacs-orgmode@gnu.org