I am using c#.net. I want to open the Function wizard on button click using the following code,
Public DispatchResultEvent OpenFunctionWizard(XComponentContext xComponentContext,XSpreadsheetDocument xSpreadsheetDocument , XSpreadsheet sheet)
{
XMultiComponentFactory m_MultiComponentFactory = xComponentContext.getServiceManager();
XDispatchHelper dispatcher = (XDispatchHelper)m_MultiComponentFactory.createInstanceWithContext("com.sun.star.frame.DispatchHelper",xComponentContext);
XFrame frame = ((XModel).xSpreadsheetDocument ).getCurrentController().getFrame();
XCellRange oRange=(XCellRange)sheet.getCellRangeByName("A1");
uno.Any result;
result = dispatcher.executeDispatch((XDispatchProvider)frame, ".uno:FunctionDialog", "", 0, null);
return (DispatchResultEvent)result.Value;
}
When i execute the code, it opens function wizard, but DispatchResultEvent (result) is always null. What is wrong in above code? Do i have to pass any ParameterValue in executeDispatch?
How to open Function wizard in Calc?
How to open Function wizard in Calc?
OpenOffice 3.1 on Windows Vista
Re: How to open Function wizard in Calc?
From the good ol' times (TM) on oooforum.org: Programming actions, where macro recorder and API fail
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice