Author Topic: What is LibreOffice Basic?  (Read 3880 times)

0 Members and 2 Guests are viewing this topic.

Offline Alex EisenhutTopic starter

  • Super Contributor
  • ***
  • Posts: 3732
  • Country: ca
  • Place text here.
What is LibreOffice Basic?
« on: January 02, 2023, 09:23:17 pm »
It is just usable within LinreOffice or can you make stand-alone programs with it? It's not terribly clear to me, I just recently found out it even exists as I was playing around the menus.

It seems to be only useful for scripting stuff within LibreOffice.
Hoarder of 8-bit Commodore relics and 1960s Tektronix 500-series stuff. Unconventional interior decorator.
 

Offline Whales

  • Super Contributor
  • ***
  • Posts: 2708
  • Country: au
    • Halestrom
Re: What is LibreOffice Basic?
« Reply #1 on: January 02, 2023, 09:47:58 pm »
Alternative to VBA.  If you have never seen it: open up any copy of (non-web) Microsoft Office and press Alt+F11
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 12498
  • Country: us
    • Personal site
Re: What is LibreOffice Basic?
« Reply #2 on: January 02, 2023, 09:51:54 pm »
It is integrated  into Libre Office. There is no standalone version. It is a logical equivalent of Visual Basic for Applications (VBA) from Microsoft.

There may be some way to run it in headless mode., but it would still require the full office package, which is a huge overkill for generic programming.
Alex
 

Offline Whales

  • Super Contributor
  • ***
  • Posts: 2708
  • Country: au
    • Halestrom
Re: What is LibreOffice Basic?
« Reply #3 on: January 02, 2023, 09:52:58 pm »
For some background:

 - VBA is amazingly powerful, because you can talk to DLLs and do all sorts of arbitrary things in the OS
 - Lots of companies have internal tools that use lots of VBA to automate tasks.
 - MS Access databases tend to use a lot for their GUIs
 - VBA can do any action you can in your office suite (I vaguely recall some annoying exceptions?)
 - VBA has lots ugly, rough edges in its syntax, IDE and error handling that have never been improved.  Things that will drive you mad.
 - VBA interactions with office can be ridiculously slow (I think you can tell MSO to stop re-rendering the GUI after each step however?  It's been a while)
 - VBA in files that you open is disabled by default as it can deliver malware
 - VBA is lock-in.  It would be almost impossible to make a 1:1 replacement (without copying all the DLLs)

I've never used LO Basic so I can't comment on how good it is. 

Puzzle for the grizzled old players: name the differences between VBA and VBS  >:D
« Last Edit: January 02, 2023, 09:56:33 pm by Whales »
 

Online ejeffrey

  • Super Contributor
  • ***
  • Posts: 4855
  • Country: us
Re: What is LibreOffice Basic?
« Reply #4 on: January 02, 2023, 11:13:23 pm »
- VBA is lock-in.  It would be almost impossible to make a 1:1 replacement (without copying all the DLLs)

So much that even MS can't (or won't) make a even a partial version for Office 365 online.  All those excel macros spreadsheets are useless for online users.  This is super annoying when chip vendors supply design tools in the form of spreadsheets with VBA macros.

 

Offline Whales

  • Super Contributor
  • ***
  • Posts: 2708
  • Country: au
    • Halestrom
Re: What is LibreOffice Basic?
« Reply #5 on: January 03, 2023, 01:29:06 am »
So much of desktop MSO is missing in Office Online.  Not to mention the nasty latency and general lag.  Documents look different in both of them and certain things break.  They're completely different pieces of software that share the same name, although I must admit I gain a nasty sense of amusement imagining them trying to compile parts of MSO C++ source into some form of javascript/webASM.

Quote
chip vendors supply design tools in the form of spreadsheets with VBA macros.

Eep.  I'd read through everything before enabling it.

On the flipside: this might be an easy way to convince vendors that I'm a "big player".  All I have to do is send them a document with cryptic VBA code that crashes on their computers and they'll know I must be a fortune 500 company.
 

Offline CatalinaWOW

  • Super Contributor
  • ***
  • Posts: 6122
  • Country: us
Re: What is LibreOffice Basic?
« Reply #6 on: January 03, 2023, 01:48:08 am »
VBA is one of those ideas which has lots of merit, and whose implementation has made it almost worthless.

On the plus side it has made it possible for me to do lots of useful extensions to Excel, adding functions for black body radiation and several useful statistical functions.

It also gave me a soft introduction to OOP programming which has always been opaque to me having started with decades of procedural languages.

On the down side, as others have mentioned it makes it possible to do all sorts of mischief, and most places I know lock down execution of VBA to protect against this.

On top of that the implementation changes in subtle ways over time.  Stuff you wrote for Office 97 isn't guaranteed to work in later regions.  The more you generate the more maintenance work you are committed to doing. 

And while there is no standalone version of VBA that I am aware of, it has lots in common with MS Visual Basic.   You can download at least a partial version of Visual Basic for free the last I checked.  The good news - it provides access to all infrastructure for Windows programs (text boxes, buttons, drop down menus and the lot).  The bad news, just like VBA it changes every couple of years. 
 

Offline Whales

  • Super Contributor
  • ***
  • Posts: 2708
  • Country: au
    • Halestrom
Re: What is LibreOffice Basic?
« Reply #7 on: January 03, 2023, 07:08:55 am »
Quote
And while there is no standalone version of VBA that I am aware of

VBS  >:D
 

Offline golden_labels

  • Super Contributor
  • ***
  • Posts: 2546
  • Country: pl
Re: What is LibreOffice Basic?
« Reply #8 on: January 05, 2023, 04:13:35 am »
How much I support libre software, scripting support in StarOffice and descendants seems like a failure. VBA was the third programming language I learned, and even MS Office 97 had very good programming environment with great documentation. In early 2000s MSDN, which included support for the VB family, was something I would consider among the finest help systems I know for software of that size.(1) Compared to VBA, the LibO environment feels like using Notepad.exe. Documentation, where available, suffers from the syndrome of being written by the author, who already knows the API. Almost useless for anybody else. :(

While with time I moved to position that it’s an anti-feature in document editors,(2) at least if the code can be attached to documents, there is one exception: database programs. Both Microsoft Access and LibO Base are tools for building frontends to databases. In particular Base is not by itself storing any information. Not having a sane programming language for that kind of software renders it useless.


(1) I could probably find some better examples, but for much smaller projects.
(2) Text processors, spreadsheets, presentation creators, drawing programs.
Why 📎 | We live in times when half of people have IQ below 100.
 
The following users thanked this post: Alex Eisenhut

Offline Alex EisenhutTopic starter

  • Super Contributor
  • ***
  • Posts: 3732
  • Country: ca
  • Place text here.
Re: What is LibreOffice Basic?
« Reply #9 on: January 05, 2023, 04:53:13 am »
Compared to VBA, the LibO environment feels like using Notepad.exe. Documentation, where available, suffers from the syndrome of being written by the author, who already knows the API. Almost useless for anybody else. :(

Yeah sadly that's what I concluded. At first I was curious but after a bit of poking around I just closed it. As I age my attention span is decreasing...
Hoarder of 8-bit Commodore relics and 1960s Tektronix 500-series stuff. Unconventional interior decorator.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->