I have a OO BASIC function in which I'm trying to use MIN the way you would in a spreadsheet cell (swapping ; for , of course), and every time I enter a call to the function in a cell, it gives me a runtime error, saying "Sub-procedure or function procedure not defined", pointing me to the line with the MIN call. Do I have to add a line to import a library or something? Thanks and sorry if this has been answered elsewhere...

Last edited by Hagar Delest on Wed May 12, 2010 10:02 pm, edited 1 time in total.
Reason:tagged [Solved].

Expanding on my last post a bit, you can access any spreadsheet function with the com.sun.star.sheet.FunctionAccess service. You just have to pass it the function name and the arguments of the function in an array. You can use the Vlookup function like this.

I can't use this code in my data calc. I have some data in sheet (0) in the range cell (A1:A1000) but when I run this macro, the results of 'print minvalue' didn't show anything..Do you have an example that works??I mean in ods file...

What is the meaning of all this? Why can't you use a simple spreadsheet? The purpose of spreadsheet software is that non-programmers do not have to write any programs to calculate weekdays, minimums, maximums etc.Obviously you are not a programmer.

Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.Ubuntu 18.04, no OpenOffice, LibreOffice 6.x

malazkd wrote:Hello Sir Villeroy, sorry but I am a beginner dev and I'm new in macro scripting. I am developing a template that generates multiple requests to be uploaded in a system.I need WORKDAY to compute due date for each request. Would you know how to implement WORKDAY in macro?.... Thanks.

No, I only know how to implement such things without macros.

Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.Ubuntu 18.04, no OpenOffice, LibreOffice 6.x

This is the kind of problem which can be cleared up easily by entering the equivalent formula into a spreadsheet cell. You did not even tell us why you think that something is wrong with your code (in fact there is nothing wrong with it). No error message, no actual sheet data, no debugging result, nothing.

Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.Ubuntu 18.04, no OpenOffice, LibreOffice 6.x