To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=50691 Issue #:|50691 Summary:|Usage of NETWORKDAYS in Basic Component:|Spreadsheet Version:|680m104 Platform:|PC URL:| OS/Version:|Windows 2000 Status:|UNCONFIRMED Status whiteboard:| Keywords:| Resolution:| Issue type:|DEFECT Priority:|P3 Subcomponent:|programming Assigned to:|spreadsheet Reported by:|fuege
------- Additional comments from [EMAIL PROTECTED] Mon Jun 13 19:05:36 -0700 2005 ------- Using NETWORKDAYS(Date, Date, CellRange) in a Spreadsheet works as expected, the analysis.dll is loaded as needed (although the doc says, it must be registered as an Add-In explicitly). Using NETWORKDAYS(Long, Long) in Basic - via FunctionAcces.callFunction() - works also, but NETWORKDAYS(Long, Long, CellRange) throughs an IllegalArgumentException?! See the Basic code below (where a named CellRange is used): Public Function testNetWorkdays() as Integer Dim oHolidays as Object, _ oFunctionAccess as Object, _ dt as Date, _ dv as Long dt = 2 ' 1900-01-01, a monday dv = DateValue(dt) oHolidays = ThisComponent.Sheets.getByIndex(0).getCellRangeByName("Holidays") oFunctionAccess = createUnoService("com.sun.star.sheet.FunctionAccess") Test = oFunctionAccess.callFunction("MIN", Array(oHolidays)) ' Works, meaning 'oHolidays' as a CellRange is accepted ... Test = oFunctionAccess.callFunction("NETWORKDAYS", Array(dv, dv)) ' Works, as the 3rd param is optional ... Test = oFunctionAccess.callFunction("NETWORKDAYS", Array(dv, dv, oHolidays)) ' IllegalArgument Error ... End Function --------------------------------------------------------------------- Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]