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 7BE49D269 for ; Wed, 4 Jul 2012 00:52:48 +0000 (UTC) Received: (qmail 58323 invoked by uid 500); 4 Jul 2012 00:52:48 -0000 Delivered-To: apmail-incubator-ooo-dev-archive@incubator.apache.org Received: (qmail 58265 invoked by uid 500); 4 Jul 2012 00:52:48 -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 58255 invoked by uid 99); 4 Jul 2012 00:52:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Jul 2012 00:52:48 +0000 X-ASF-Spam-Status: No, hits=1.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of chenpeng2006@gmail.com designates 209.85.217.175 as permitted sender) Received: from [209.85.217.175] (HELO mail-lb0-f175.google.com) (209.85.217.175) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Jul 2012 00:52:41 +0000 Received: by lbol5 with SMTP id l5so9328830lbo.6 for ; Tue, 03 Jul 2012 17:52:20 -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=0xpQnRHJyR2s4zfGDGAiUmj4s3UHRFX8TwgdefGMfas=; b=xlcF0ctj7C3g5RvJ9trE/g4PAXX9q0WE5+rDwfzJds5BNjiQTxpprEV9IvXWjnnXBr F5qKRcPdpL/+zUB3X2/0kjRE1d9jQglT+DIiMA3ChLchAbqQtNKMeRVyO/CzIgZEQGY5 a0hE1DUWMkUqsLosPj6D+fV5c89C8mT4nD30IGN9frRAleeoTImTCaPKQAtOOx4opuaA vZclPUhongCTv3mO9tQhSvSjf2ps+zlAw/k8387HDfYk7eCpN46H6uSjOzsnJxNgGgIf M+tdw0bEViVH6aaarHBH7j2ssJLEW5OE33hcqYpPL65E1u3dMSXgeFbxt0gtP01l8Bp1 8q2Q== MIME-Version: 1.0 Received: by 10.152.48.37 with SMTP id i5mr19550860lan.36.1341363140201; Tue, 03 Jul 2012 17:52:20 -0700 (PDT) Received: by 10.112.47.103 with HTTP; Tue, 3 Jul 2012 17:52:20 -0700 (PDT) In-Reply-To: <4FF304C4.7040600@t-online.de> References: <4FF304C4.7040600@t-online.de> Date: Wed, 4 Jul 2012 08:52:20 +0800 Message-ID: Subject: Re: [DISCUSS]Macros are lost after saving the xls file to ods, then save as to xls again From: Chen Peng To: ooo-dev@incubator.apache.org Content-Type: multipart/alternative; boundary=bcaec55239807c8c4a04c3f67101 X-Virus-Checked: Checked by ClamAV on apache.org --bcaec55239807c8c4a04c3f67101 Content-Type: text/plain; charset=ISO-8859-1 Comparing with xls-file, we lost VBA attributes when importing. In xls-file, VBA macro is comprised by the source in IDE and related VBA attributes. We can't get the attributes from IDE in ods-file, we just can get the source from IDE in ods-file. Without those attributes we can't write the macro back to xls-file. 2012/7/3 Regina Henschel > Hi, > > chengjh schrieb: > > 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. >> > > I do not like the idea, that a binary code which I do not know what it > does, will be shipped together with an ods-file. Because the source it > editable in the IDE, the source and the binary might differ. The binary can > be dangerous although the source looks harmless. I consider this a security > problem. > > Currently the macro is lost, although the source is in the ods-file and > commented as VBA macro. Isn't it possible, to write the macro back to > xsl-file from this source? > > Kind regards > Regina > > > >> 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. >>> >>> >> >> >> > > --bcaec55239807c8c4a04c3f67101--