Return-Path: Delivered-To: apmail-jakarta-poi-user-archive@www.apache.org Received: (qmail 19165 invoked from network); 26 Aug 2006 05:36:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 26 Aug 2006 05:36:58 -0000 Received: (qmail 3808 invoked by uid 500); 26 Aug 2006 05:36:56 -0000 Delivered-To: apmail-jakarta-poi-user-archive@jakarta.apache.org Received: (qmail 3784 invoked by uid 500); 26 Aug 2006 05:36:56 -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 3773 invoked by uid 99); 26 Aug 2006 05:36:56 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Aug 2006 22:36:56 -0700 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=DNS_FROM_RFC_ABUSE,FORGED_YAHOO_RCVD,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of cheenu321@gmail.com designates 64.233.166.179 as permitted sender) Received: from [64.233.166.179] (HELO py-out-1112.google.com) (64.233.166.179) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Aug 2006 22:36:54 -0700 Received: by py-out-1112.google.com with SMTP id d80so1501176pyd for ; Fri, 25 Aug 2006 22:36:31 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:references:x-google-sender-auth; b=AiPr69NNTwT7vYu+3w4YwmnzzomfDM5xdVId9cgKi1Bb2yY2uQ1ctufrvqRSzDjrtWBrruPzyqiyTrtkBrK4Qs7n+s2H4j5t7n1KPOnlxklHZAetm9vVKBLsogIUwobJp4U6umA++Cua8+NGWYnvkCmurZY+r/IXYBV2HZXJ82A= Received: by 10.35.127.7 with SMTP id e7mr6734856pyn; Fri, 25 Aug 2006 22:36:31 -0700 (PDT) Received: by 10.35.45.20 with HTTP; Fri, 25 Aug 2006 22:36:31 -0700 (PDT) Message-ID: <4a2714570608252236l5373726dtbc4e9252d3b54334@mail.gmail.com> Date: Sat, 26 Aug 2006 00:36:31 -0500 From: Cheenu Sender: cheenu321@gmail.com To: "POI Users List" Subject: Re: how to combine two workbooks Cc: jxls-devel@lists.sourceforge.net, jxls-user@lists.sourceforge.net In-Reply-To: <4a2714570608251823n6d503d69m6865348c2ba1389e@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_165387_26092066.1156570591091" References: <4a2714570608241435o41a78385x21688c943358dbfc@mail.gmail.com> <44EE1DA7.1010206@stud.uni-karlsruhe.de> <4a2714570608250910h5b9933fhff3cc653f726dbce@mail.gmail.com> <44EF728C.9080602@stud.uni-karlsruhe.de> <4a2714570608251823n6d503d69m6865348c2ba1389e@mail.gmail.com> X-Google-Sender-Auth: d2d4a3907bf7d210 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_165387_26092066.1156570591091 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Yaahhhoooooooooo!! Found a perfectly working copySheet code for POI - atleast for my needs. http://jxls.cvs.sourceforge.net/jxls/jxls/src/java/org/jxls/util/Util.java?view=markup method copySheets. Nice job jXLS contributors, in this case Leonid Vysochyn. Thanks. On 8/25/06, Cheenu < sm88il-noreply@yahoo.com> wrote: > > Something like the cloneSheet method cannot be used, as it seems like the > BIFF fileformat is more complicated than that. > I think it would be more safer and API compliant to do something like the > attached code. > But, it is far from complete - one main problem is that there is no way to > copy over Workbook styles. > Seems like in BIFF all styles are kept at workbook level and not at sheet > level. > > > On 8/25/06, Sebastian Frehmel < uhbdz@stud.uni-karlsruhe.de> wrote: > > > > I'm sorry, but I dont't think I will be able to post code here within > > the next 3 weeks because I've got other, way more important stuff to do. > > But what came in to my mind is the cloneSheet method. > > This method is used to clone a sheet within a workbook But if someone > > looked into the source code a little deeper, this someone might probably > > > > find a way to return the sheet to another workbook. > > Do you have time and knowledge for this? > > > > Cheenu schrieb: > > > Sebastian, > > > Seems like there is no way to do this than copying cell by cell. > > > JExcelApi does not provide a way as well - > > > http://groups.yahoo.com/group/JExcelApi/message/8069 > > > > > > Can we exchange code to get the best possible way to do this? > > > I will code something up and post it here. > > > > > > Cheenu > > > > > > On 8/24/06, Sebastian Frehmel wrote: > > >> > > >> This is a feature I miss, too. > > >> Just the possibility to say something like: > > >> wb.addSheet(HSSFSheet a) > > >> > > >> Until now I had to copy all cells manually.... > > >> Does anyone know how? > > >> > > >> Cheenu schrieb: > > >> > I have two HSSFWorkbook objects, each having one HSSFSheet. > > >> > I want to create a third HSSFWorkbook containing two sheets (one > > from > > >> > each > > >> > of the workbooks). > > >> > > > >> > I could not find a way to do this from the API - am I missing > > >> something. > > >> > > > >> > A code snippet to explain the same: > > >> > > > >> > HSSFWorkbook hrWorkBook = getDepartmentDetails("HR"); > > >> > HSSFWorkbook financeWorkBook = getDepartmentDetails("Finance"); > > >> > > > >> > HSSFWorkbook finalWorkBook = ???; // I want to somehow create > > this > > >> > finalWorkBook with the one sheet from the hr and finance workbook > > >> > > > >> > Thanks > > >> > Cheenu > > >> > > >> --------------------------------------------------------------------- > > >> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org > > >> Mailing List: http://jakarta.apache.org/site/mail2.html#poi > > >> The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/ > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org > > Mailing List: http://jakarta.apache.org/site/mail2.html#poi > > The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/ > > > > > > ------=_Part_165387_26092066.1156570591091--