I have few macros run OpenOffice to draw inside the spreadsheet. How can I covert them to run inside Excel in Windows?
The code I have looks like :
Global aPoint As New com.sun.star.awt.Point
Global aSize As New com.sun.star.awt.Size
Global oPage As Object
oRectangleShape = oDocument.createInstance("com.sun.star.drawing.RectangleShape")
Convert OpenOffice macro to Excel
Convert OpenOffice macro to Excel
OpenOffice.org.3.3.0
Re: Covert OpenOffice macro to Excel
There is no way to do that as far as I know. Excel will not run OpenOffice macros. Can you explain what you are trying to do?
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
Re: Convert OpenOffice macro to Excel
the users for my spreadsheet will work in Windows or Linux, that means they may run the macro for draw rectangle shape in Excel(Windows) or Openoffice(Linux).
So the macro I created must able to work for both.
I think may be I need do some manually map from the OOo codes to Excel.
So the macro I created must able to work for both.
I think may be I need do some manually map from the OOo codes to Excel.
OpenOffice.org.3.3.0
Re: Convert OpenOffice macro to Excel
If you can write a macro that distinguishes Windows from Linux and then distinguishes Excel from OpenOffice, which will run on both operating systems, you can use two Macros - one written for Excel, one for OpenOffice and place them inside the decision loops.
This simplifies if you guarantee that Windows users will always use Excel and linux always OpenOffice = then you only need test for the operating system.
There may be other problems between the two applications, such as syntax for cell entries, but I presume you are aware of these.
This simplifies if you guarantee that Windows users will always use Excel and linux always OpenOffice = then you only need test for the operating system.
There may be other problems between the two applications, such as syntax for cell entries, but I presume you are aware of these.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Re: Convert OpenOffice macro to Excel
If I understood correctly, the question was mainly about drawing shapes. I would expect that drawing on Excel sheets is completely different from drawing in AOO on the model level. Who does actually know?
On Windows 10: LibreOffice 24.2 (new numbering) and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
---
Lupp from München
Re: Convert OpenOffice macro to Excel
Your macros will work on Mac, Linux and Windows if the users install LibreOffice. There is no reason to not install the required software for the task.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: Convert OpenOffice macro to Excel
Nobody uses OO.o 3.3.0 version today - the names of the recent versions: Apache OpenOffice and its fork, the LibreOffice.I think may be I need do some manually map from the OOo codes to Excel.
OpenOffice.org.3.3.0
You must know it: The LibreOffice has a littlebit higher compatibility with the foreign file formats and the MS VBA macros. But there is not (never was and never will be) 100% compatibility.
There is not "linear conversion" way to full conversion of the macros. You must use different procedures and different functions with different passed paramaters in the different environments. You must totally rewrite your macros.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.