What is the UNO equivalent of the following VBA statement:
Application.Calculation = xlCalculationManual
I've found that VBA Application. is replaced with UNO ThisComponent. I've installed both MRI and the ObjectInspector but haven't yet found how to get the properties and interfaces for the ThisComponent service...
I've spent the last four days with StarOffice 8 Programming Guide for BASIC learning about UNO, the API, Getting started...
But this one eludes me and Google...
Thanks in advance.
Best regards, Andy
http://genietvanhetleven.blogspot.com/
[Solved] Calc Calculation modes?
[Solved] Calc Calculation modes?
Last edited by Hagar Delest on Sat Apr 30, 2011 5:58 pm, edited 1 time in total.
Reason: tagged [Solved].
Reason: tagged [Solved].
OOo 3.0.X on openSuse 11
- Charlie Young
- Volunteer
- Posts: 1559
- Joined: Fri May 14, 2010 1:07 am
Re: Calc Calculation modes?
alavarre wrote:What is the UNO equivalent of the following VBA statement:
Application.Calculation = xlCalculationManual
I've found that VBA Application. is replaced with UNO ThisComponent. I've installed both MRI and the ObjectInspector but haven't yet found how to get the properties and interfaces for the ThisComponent service...
I've spent the last four days with StarOffice 8 Programming Guide for BASIC learning about UNO, the API, Getting started...
But this one eludes me and Google...
Thanks in advance.
Best regards, Andy
http://genietvanhetleven.blogspot.com/
Code: Select all
ThisComponent.enableAutomaticCalculation(True/False)
Apache OpenOffice 4.1.1
Windows XP
Windows XP
Re: Calc Calculation modes?
Woohoo! Thanks!
Is this all in your head or is there a web (or other) source? I've found:
http://documentation.openoffice.org/HOW ... icXref.pdf
Porting Excel/VBA to
Calc/StarBasic 2004
http://wiki.services.openoffice.org/w/i ... cExcel.pdf
Differences in Use between
Calc and Excel
http://www.business-spreadsheets.com/vba2oo.asp
VBA to OO Basic Converter
Convert VBA to OpenOffice Basic
But none offered a solution.
Again, thank you very much,
Andy
Best regards, Andy
Is this all in your head or is there a web (or other) source? I've found:
http://documentation.openoffice.org/HOW ... icXref.pdf
Porting Excel/VBA to
Calc/StarBasic 2004
http://wiki.services.openoffice.org/w/i ... cExcel.pdf
Differences in Use between
Calc and Excel
http://www.business-spreadsheets.com/vba2oo.asp
VBA to OO Basic Converter
Convert VBA to OpenOffice Basic
But none offered a solution.
Again, thank you very much,
Andy
Best regards, Andy
OOo 3.0.X on openSuse 11
- Charlie Young
- Volunteer
- Posts: 1559
- Joined: Fri May 14, 2010 1:07 am
Re: Calc Calculation modes?
The main API docs are here.alavarre wrote:Woohoo! Thanks!
Is this all in your head or is there a web (or other) source? I've found:
http://documentation.openoffice.org/HOW ... icXref.pdf
Porting Excel/VBA to
Calc/StarBasic 2004
http://wiki.services.openoffice.org/w/i ... cExcel.pdf
Differences in Use between
Calc and Excel
http://www.business-spreadsheets.com/vba2oo.asp
VBA to OO Basic Converter
Convert VBA to OpenOffice Basic
But none offered a solution.
Again, thank you very much,
Andy
Best regards, Andy
This one is slightly tricky. There is a ThisComponent.isAutomaticCalculationEnabled, which one would normally think is a property that could be set directly by
Code: Select all
ThisComponent.isAutomaticCalculationEnabled = True/False
Code: Select all
sub setAutoCalculate(calcstate as Boolean)
dim document as object
dim dispatcher as object
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "AutomaticCalculation"
args1(0).Value = calcstate
dispatcher.executeDispatch(document, ".uno:AutomaticCalculation", "", 0, args1())
end sub
Apache OpenOffice 4.1.1
Windows XP
Windows XP
Re: Calc Calculation modes?
> The main API docs are [here].
Ah yes, I had found that also, very arcane... I was hoping for something more direct. The [Porting...]
doc is good as far as it goes, but as noted doesn't go far enough. The MRI and Inspector may render the API but again have a learning curve...
> This one is slightly tricky. There is a ThisComponent.isAutomaticCalculationEnabled,
>...
>That is a bit clumsy compared to the other method.
Indeed...
Thanks again, back to doing homework. Have a great weekend.
Kind regards, Andy
Ah yes, I had found that also, very arcane... I was hoping for something more direct. The [Porting...]
doc is good as far as it goes, but as noted doesn't go far enough. The MRI and Inspector may render the API but again have a learning curve...
> This one is slightly tricky. There is a ThisComponent.isAutomaticCalculationEnabled,
>...
>That is a bit clumsy compared to the other method.
Indeed...
Thanks again, back to doing homework. Have a great weekend.
Kind regards, Andy
OOo 3.0.X on openSuse 11