Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 45766 invoked from network); 5 May 2008 22:15:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 May 2008 22:15:08 -0000 Received: (qmail 1473 invoked by uid 500); 5 May 2008 22:15:00 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 1435 invoked by uid 500); 5 May 2008 22:15:00 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 1421 invoked by uid 99); 5 May 2008 22:15:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 May 2008 15:15:00 -0700 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 (athena.apache.org: domain of bhaarat.s@gmail.com designates 209.85.128.185 as permitted sender) Received: from [209.85.128.185] (HELO fk-out-0910.google.com) (209.85.128.185) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 May 2008 22:14:15 +0000 Received: by fk-out-0910.google.com with SMTP id k31so1064735fkk.11 for ; Mon, 05 May 2008 15:14:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; bh=3hqu9Kx6R57935Q/N3fektnOsnmoo/JQIU2FUs86i0I=; b=EtSyRQauBOinoMEBY6K9nMN/A+TIkZYjH08Pk3sXzHC92bY3RTIM9KsUYMeJAgfo1EmtynxZwXfW85sRxh8cVagKwIWnZOp0URBGxh2lRkakwVQD79VYaSrTVU5ygSBj92HN4N51VkJNJidyIQeG6x+PLF5yKiU1XnmhymIpJiw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=jYKjm/GpYzRugWm1m2z9P8XOv/aah9ZSOppz9DuVQkTLNhK06uiZu5BCwq31i7TobjGDdWeXSkxanQ1lxKzoPi8QT+NugeuYqaTLNxtHtG7TFgIhObXz6PRAU1EskkbCvNYgqmPPQRYkUsYyUPsNARo0RgAZ1BgkHKt7z0cZNto= Received: by 10.82.176.11 with SMTP id y11mr631725bue.53.1210025667755; Mon, 05 May 2008 15:14:27 -0700 (PDT) Received: by 10.82.120.13 with HTTP; Mon, 5 May 2008 15:14:27 -0700 (PDT) Message-ID: <491bd2b50805051514v7a5f967bjae436da349d0028a@mail.gmail.com> Date: Mon, 5 May 2008 18:14:27 -0400 From: "bhaarat Sharma" To: "Struts Users Mailing List" Subject: Struts 1 - using POI and FormFile to read an excel file MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_5216_20264972.1210025667746" X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_5216_20264972.1210025667746 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello, I am currently using Struts 1 - FormFile to uplaod various documents. Now I have a requirement to read an excel file as the user uploads it. For this I am using Apache POI. this is how poi reads an excel sheet InputStream myxls = new FileInputStream("workbook.xls")); HSSFWorkbook wb = new HSSFWorkbook(myxls); Does someone know a way so that I can give the FormFile object to the HSSFWorkBook Constructor? Basically I will be getting the uploaded excel file from the user as userObject.getUploadedFile() //which returns a FormFile object. Thanks for any help!! -bhaarat ------=_Part_5216_20264972.1210025667746--