openoffice-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chengjh <>
Subject Re: [DISCUSS]Macros are lost after saving the xls file to ods, then save as to xls again
Date Wed, 04 Jul 2012 03:05:05 GMT
Hi Rob,

On Tue, Jul 3, 2012 at 7:15 PM, Rob Weir <> wrote:

> On Mon, Jul 2, 2012 at 4:33 AM, 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.
> How common is this scenario?   Wouldn't the more typical user action
> be to re-save the document back to XLS format?

a)It is a good question about the scenario,common or not..But I think Peng
wants to ask for comments about the technical solution.

> Isn't that what
> happens by default when they do a save when editing an XLS file? If
> the user does this, will the macro be saved correctly?
> b)When AOO Spreadsheet launches an xls file with VBA macros, the VBA
streams will have a copy in memory and simultaneously the VBA macros are
parsed into Spreadsheet VBA model, and end users can see and edit the VBA
macros in IDE. Be aware, the modifications will only be kept in Spreadsheet
VBA model, and will be lost when end users do saving[to xls], instead, the
copy of the VBA Streams in memory will be saved back.So,if end users open
the saved xls file in MS Excel,they will only see the original VBA macros.

> >       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

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message