Return-Path: X-Original-To: apmail-incubator-ooo-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-ooo-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BB576C5C1 for ; Tue, 3 Jul 2012 14:22:43 +0000 (UTC) Received: (qmail 70753 invoked by uid 500); 3 Jul 2012 14:22:43 -0000 Delivered-To: apmail-incubator-ooo-dev-archive@incubator.apache.org Received: (qmail 70434 invoked by uid 500); 3 Jul 2012 14:22:43 -0000 Mailing-List: contact ooo-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ooo-dev@incubator.apache.org Delivered-To: mailing list ooo-dev@incubator.apache.org Received: (qmail 70405 invoked by uid 99); 3 Jul 2012 14:22:42 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Jul 2012 14:22:42 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lei.wang.leiw@gmail.com designates 209.85.160.175 as permitted sender) Received: from [209.85.160.175] (HELO mail-gh0-f175.google.com) (209.85.160.175) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Jul 2012 14:22:34 +0000 Received: by ghbz2 with SMTP id z2so5034280ghb.6 for ; Tue, 03 Jul 2012 07:22:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=zNs7DnT6YE4zBsWhhUmFYCh1K3+PBb7Ue6r7SoB9/Xg=; b=kcwfiC2JVQDs8n3wJc8BZVdDnCM9PSwKt2kGBBH5fcURLsHsWEQIDBU8TI8gN2Kuio N+mGmjpRcxj1xlR8pczSnVvmqjoptceVSyFQu3oHBOH3/F5q0yP8X0BWBSEcZ+ErW0QI +8bkC/nghIZqpuFRaUz33hl+YLzpoo45u6Lgw+Q6EtKEWAhVd8RW7W3MaVX65fC2HY4s M1W2n4FplDekIVzKj/XmLv3kDHrSjCvV029SIO3qmoW67mrBFAAeZ8i1SNXIOItK9WSn hVEqobYS3a86SLmWMwKcxdVo+2+C7qzg+LjbSutSYvZL7cZM186S/HMNjE8GshAr7Gga EWaw== MIME-Version: 1.0 Received: by 10.66.72.225 with SMTP id g1mr29929911pav.3.1341325332924; Tue, 03 Jul 2012 07:22:12 -0700 (PDT) Received: by 10.142.89.15 with HTTP; Tue, 3 Jul 2012 07:22:12 -0700 (PDT) In-Reply-To: References: Date: Tue, 3 Jul 2012 22:22:12 +0800 Message-ID: Subject: Re: [DISCUSS]Macros are lost after saving the xls file to ods, then save as to xls again From: Lei Wang To: ooo-dev@incubator.apache.org Content-Type: multipart/alternative; boundary=f46d042f9eb0ff492604c3eda3a1 --f46d042f9eb0ff492604c3eda3a1 Content-Type: text/plain; charset=ISO-8859-1 As I know, VBA code can be related with specific sheet. When end user open the ods file and remove this sheet, then save it as xls file. According to your solution, all VBA codes will be restored in xls file. Is this xls file valid? Another concern is does your solution conform to ODF1.2 standard? On Tue, Jul 3, 2012 at 6:32 PM, chengjh wrote: > That doesn't matter that you think they are VBA or Star Basic when saving a > xls with VBA as ods file..To some APIs with behavior difference,they will > be distinguished with the line "Option VBASupport 1" at the beginning..End > users can modify the Star Basic codes in AOO Spreadsheet,but all Star Basic > contents including original and modified will be lost when exporting to xls > file..Here,if the ods file is converted from a xls file based on Peng's > solution,the behavior is still kept unchanged...The only difference is that > the saved binary VBA streams within the ods file will be exported to the > xls file at that time.Thus,when end users launch the xls file in MS > Excel,the original VBA will be there.That's the expected result.thanks. > > On Tue, Jul 3, 2012 at 5:02 PM, Lei Wang wrote: > > > Jian Hong, > > > > Will AOO save VBA as Star Basic in ods file when saving a xls file with > VBA > > as ods file? If it is true, can user modify the Star Basic in the new ods > > file? What happened if user change the Star Basic in the ods file then > save > > as a xls file? > > > > On Tue, Jul 3, 2012 at 3:57 PM, chengjh wrote: > > > > > Hi Peng, > > > > > > Let me use a scenario to confirm your problem,solution and > > > question..Anything misunderstood,please correct me.thanks. > > > > > > Problem: > > > When AOO launches an excel document with VBA,saves to ods and then > saves > > to > > > excel again,the VBA info will be lost. > > > > > > Solution: > > > a)The VBA streams of an excel document will be saved into the ods > > document > > > with binary format when converting an excel document to an ods document > > in > > > AOO Spreadsheet with certain controller. > > > b)Once the ods document containing the binary VBA streams is launched > > into > > > AOO or previous releases,with certain controller,the binary VBA steams > > will > > > be loaded[still binary stream in memory] or rejected..There is no any > > > impact on the application,the application can still work well. > > > c)Based on b),if the ods document is saved to an excel document,the > > binary > > > VBA streams will be exported, thus, the VBA info will not be lost. > > > > > > Question: > > > You are not sure whether this solution is reasonable. So, you want to > > know > > > the comments about your solution. If no comments, you will do so to > > > implement it. > > > > > > On Mon, Jul 2, 2012 at 4:33 PM, Chen Peng > > wrote: > > > > > > > Hi All, > > > > My name is Chen Peng, I am a developer from Symphony. My > special > > > > areas are VBA and sw. > > > > Now I found an issue about macros lost: > > > > I saved an excel file with VBA to spreadsheet, the VBA can > > work > > > > well in spreadsheet, then I wanted to save this spreadsheet back to > > > excel, > > > > but all the macros are lost. > > > > I propose to save the binary data of excel VBA to spreadsheet, > > when > > > > saving excel to spreadsheet, then we can get the binary data from > > > > spreadsheet if need to save the spreadsheet to excel again. > > > > The binary data will not impact the open/save... of the ODF > > format > > > > application, it will not be touched when we operate the ODF formant > > > > applications. The binary data will be just used when we want to save > > the > > > > spreadsheet to excel, it is just a data prestore about saving > > spreadsheet > > > > macros to excel. > > > > Can you give some advice about the solution? > > > > Any feedback will be preciated, thanks. > > > > > > > > > > > > > > > > -- > > > > > > Best Regards,Jianhong Cheng > > > > > > > > > -- > > Best Regards,Jianhong Cheng > --f46d042f9eb0ff492604c3eda3a1--