Ask Your Question
0

Are LO Basic macros always more complex then equivalent Excel VBA macros? [closed]

asked 2014-05-13 17:11:48 +0100

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

I have extensive Excel VBA macros and I've just started looking at Libre and it seems that Libre's macros require very much more code to do very simple things - so much so there there would be a LOT more typing and the resultant code would be very much harder to read.

I have tried a converter that tells me that Range("A1")=1 becomes:

Dim oSheet as Object[n]oSheet = ThisComponent.CurrentController.ActiveSheet[n]oSheet.getCellRangeByName($1)("A1")=1

I have also tried letting Libre create macros as I type and the results are very very much longer and much more obscure.

I doubt that it is in reality as bad as it looks because people are actually using it.

Am I just not looking at it correctly or is it really so bad?

Thanks for your insights.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2016-02-29 16:48:48.322955

1 Answer

Sort by » oldest newest most voted
0

answered 2014-07-13 07:28:38 +0100

oweng gravatar image

I would doubt that LO Basic is "always more complex" than VBA however they do use different object models to access the respective document format (ODF for LO Basic; MS Binary / OOXML for VBA). This may be part of the reason why they appear so different. MS Office may mask some of the boiler-plate VBA code from the Excel user.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-05-13 17:11:48 +0100

Seen: 857 times

Last updated: Jul 13 '14