Questions tagged [openoffice-basic]

OpenOffice.org Basic is a programming language which is based on StarOffice Basic and bears similarity to Microsoft VBA.

Resources:

109 questions
6
votes
2 answers

How to keep leading zero and add comma in openoffice calc formula?

I have 6 fields in a row in open office, the 1st is a word, the 2nd, 3rd, and 4th are a number with a leading zero, the 5th and 6th are regular numbers. How do I join them all together with a comma between them so that the leading zero stays?
user1367204
  • 4,549
  • 10
  • 49
  • 78
5
votes
1 answer

How do I check for broken internal links in Star Basic?

I am creating a Basic macro for LibreOffice Writer to check for broken internal links. In a nutshell: generate a list of all anchors loop through the document, finding internal hyperlinks if the internal hyperlink is not on the anchor list, open it…
4
votes
1 answer

How can I speed up OpenOffice Calc Macro that updates many cells?

I have an OpenOffice Calc macro (in Basic) that rounds all numbers in the active worksheet to a given number of decimal places. It takes about 4 seconds to process 100 rows of a 9000 row spreadsheet. Each row has 35 columns, of which 19 columns are…
Paul Chernoch
  • 5,275
  • 3
  • 52
  • 73
4
votes
1 answer

LibreOffice / OpenOffice Calc: VBscript, export of XLS sheets to CSV

I'm trying to write a script for a while now but it seems that one part of it just does not work. Situation: I need a VB script that can use any LibreOffice (/ OpenOffice) Calc (3.5.4 in my case) installation on any Windows XP or 7 system for export…
Devnul
  • 111
  • 1
  • 1
  • 5
3
votes
1 answer

OpenOffice Base - how to change height of Table Control in Macro?

I've got Table Control in Libre/OpenOffice Base form which is filled dynamically. I want to change height of it to match number of rows. How to do it? I've tried changing getSize() / setSize(), and height property but I'm getting: Property or method…
3
votes
2 answers

Libre Office Macro to crop image

I have a Libre Office Macro and I need to crop an image, but I have been unable to find any helpful documentation or an example. Anyone have a tip how to do it? dim noArgs() dim emptyDocComponent as object dim document as object dim dispatcher as…
3
votes
1 answer

OpenOffice Calc function return #VALUE

I would like to write a Basic function for Calc that return #VALUE! testable with ISERR(). Function foo() foo = #VALUE! End Function But that foo function return 0 and not some error #VALUE!. How should I do it?
Cabu
  • 514
  • 2
  • 5
  • 15
3
votes
3 answers

Continue For Loop in OpenOffice Basic

Is there a way to continue a loop in OpenOffice Basic like in other language? For i = 0 To 10 If i = 5 Then Continue For # Not working End If Next i I know the Syntax Exit For to break a loop but I have to skip some iterations... Thank…
Viatorus
  • 1,804
  • 1
  • 18
  • 41
3
votes
2 answers

Run shell command and return output as result of custom function

I would like to write a custom OpenOffice function that runs a shell command and puts the result into the cell from which it was invoked. I have a basic macro working, but I can't find a way to capture the command's output. Function MyTest( c1 ) …
Mark
  • 343
  • 1
  • 4
  • 13
3
votes
1 answer

Programmatically convert *.odt file to MS Word *.doc file using an OpenOffice.org basic macro

I am trying to build a reStructuredText to MS Word document tool-chain, so I will be able to save only the rst sources in version control. So far I -- Have rst2odt.py to convert reStructuredText to OpenOffice.org Writer format. Next I want to use…
Chen Levy
  • 15,438
  • 17
  • 74
  • 92
3
votes
1 answer

Is there a way to attach a file (.txt) in calc open office programmatically (using macro)?

I have a .txt file that I need to attach in a column of my sheet, and i have the path to this file. So I need to read this path and attach the file in another column programmatically. Is there a way to do it? thanks in advance.
2
votes
1 answer

How to run a script from another document

I have two doc LibreOffice calc test1.ods and test2.ods. I want run a script in test2 from the script of test1. When test2 is open by the script of test1, i can't run the script on test2 even from test2. How i can pass out the security for the…
patol
  • 136
  • 2
  • 10
2
votes
2 answers

Custom Array Functions in Open Office Calc

Could someone please tell me how to write a custom function in Open Office Basic to be used in Open Office Calc and that returns an array of values. An example of one such built-in function is MINVERSE. I need to write a custom function that…
2
votes
1 answer

OpenOffice how to add more than 3 conditional formatting?

How to add more than 3 conditional formatting in OpenOffice ? By defaut it's 3, but i want add more, how can I do it ? For this moment I have 3, like this: $H21="OPEN" $H21="CLOSED" $H21="SEND But a want to add another 2 conditions…
2
votes
3 answers

Open Office replace()

does Open Office BASIC support function replace(string,search string, replace with)?
tomasBULL
  • 563
  • 5
  • 10
1
2 3 4 5 6 7 8