Return-Path: Delivered-To: apmail-jakarta-poi-user-archive@www.apache.org Received: (qmail 25771 invoked from network); 2 Jan 2007 08:23:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Jan 2007 08:23:30 -0000 Received: (qmail 9901 invoked by uid 500); 2 Jan 2007 08:23:35 -0000 Delivered-To: apmail-jakarta-poi-user-archive@jakarta.apache.org Received: (qmail 9788 invoked by uid 500); 2 Jan 2007 08:23:34 -0000 Mailing-List: contact poi-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "POI Users List" Reply-To: "POI Users List" Delivered-To: mailing list poi-user@jakarta.apache.org Received: (qmail 9777 invoked by uid 99); 2 Jan 2007 08:23:34 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Jan 2007 00:23:34 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of trancongkhanh@gmail.com designates 64.233.166.178 as permitted sender) Received: from [64.233.166.178] (HELO py-out-1112.google.com) (64.233.166.178) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Jan 2007 00:23:23 -0800 Received: by py-out-1112.google.com with SMTP id f31so3194398pyh for ; Tue, 02 Jan 2007 00:23:03 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:from:to:subject:date:mime-version:content-type:x-mailer:thread-index:x-mimeole:message-id; b=pjV5QfRmhDbWF4rdUx2hxqk9MxR+JQ0viDuRi+noI+B2YDz6fIxvF7qapV0UKGjDKk56EWtrIu/PNTanmR/qqggJb87hp9ARrhy9Z2wgtzpoYjQ3cl9L0WDFMc+3TkhV5L+wNy3uFYO1vMH9Dkp04276T3lo30SMYbDJJWhIVjA= Received: by 10.35.103.12 with SMTP id f12mr37017462pym.1167726182748; Tue, 02 Jan 2007 00:23:02 -0800 (PST) Received: from khanhtran ( [125.234.138.149]) by mx.google.com with ESMTP id 36sm12297762nza.2007.01.02.00.23.00; Tue, 02 Jan 2007 00:23:02 -0800 (PST) From: "Khanh Tran" To: , "'POI Users List'" Subject: POI formula syntax checking? Date: Tue, 2 Jan 2007 15:15:41 +0700 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0004_01C72E80.E0B5F060" X-Mailer: Microsoft Office Outlook, Build 11.0.5510 Thread-Index: AccuK9u4KLpOgZM3ThOVRz/pBE0F/wAGjf+w X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 Message-ID: <459a1666.32f54bdc.317c.6662@mx.google.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_NextPart_000_0004_01C72E80.E0B5F060 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Dear experts, I am using Formula Evaluator package to evaluate some Excel functions. When I enter the correct formula syntax, it works fine. But when I enter incorrect formula syntax, it does not throws any error message. I want to retreive the error messages related to my wrong syntax. Here is the code: //it works fine with correct formula syntax cell.setCellFormula("Upper(\"abc\")"); HSSFFormulaEvaluator.CellValue cellValue = evaluator.evaluate(cell); //Cannot get error message cell.setCellFormula("Upper(\"abc\", \"def\")"); //incorrect formula syntax HSSFFormulaEvaluator.CellValue cellValue = evaluator.evaluate(cell); assert(cellValue.cellType = CELL_TYPE_ERROR); Thanks. ------=_NextPart_000_0004_01C72E80.E0B5F060--