Custom Excel function

At design-time Excel needs the custom (or user defined) function to be defined in VBA or it won't work, see here: http://www.vertex42.com/ExcelArticles/user-defined-functions.html
For example (I don't have a custom function in Excel called BV) so when I type =BV() and press return Excel says
#NAME?
So the Excel custom function is for design-time (or use outside Xcelsius in Excel on ites own).
When you preview or export Xcelsius needs the ActionScript equivalent of the Excel custom function (as an add-on like you have already created).
Have you also created the function for Excel to use at design-time?
Regards
Matt

It is hard to say from looking at the code.
First of all you need to create the VBA function in Excel, once you have that then you can use the VBA function in Excel itself.
Then you can test in design time.
Then you can test in preview time (which uses the AS version).
Regards
Matt

Similar Messages

  • Help writing a excel function to a cell using powershell

    I have been working on a function that will write worklog information to an excel template. I am able to get it to work but once i added the date column and tried to write a excel function to it I'm getting the below error.
    Exception setting "Item": "Exception from HRESULT: 0x800A03EC"At
    C:\Users\shuppz\Documents\WindowsPowerShell\Modules\Client Config CDRL\Source\Get-Assignment.ps1:1482 char:4
    + $Main.Cells.Item($i, 9) = $DateFunction
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [], SetValueInvocationException
    + FullyQualifiedErrorId : CatchFromBaseAdapterParameterizedPropertySetValueTI
    the excel string i need to add to the cell is to add a date and the string i created is in the below function called $DateFunction.
    Function Create-Worklog
    Param ($NewFile, $DBName, $Work)
    $before = @(Get-Process [e]xcel | %{ $_.Id })
    $ExcelObject = new-Object -comobject Excel.Application
    $ExcelId = Get-Process excel | %{ $_.Id } | ? { $before -notcontains $_ }
    $ExcelObject.visible = $False
    $ExcelObject.DisplayAlerts = $False
    $ActiveWorkbook = $ExcelObject.WorkBooks.Open($NewFile)
    $Main = $ActiveWorkbook.Worksheets.Item('Worklog')
    $Main.Cells.Item(2, 6) = $(Get-Date -f MM/dd/yyyy)
    $Main.Cells.Item(3, 6) = $($DBName.Replace(".accdb",""))
    $i = 6
    ForEach ($W in $Work)
    $DateFunction = "=IF (G$i = " + [char](34) +"Mitigated" + [char](34) + ", TODAY(), IF (G$i = " + [char](34) +"Escalated" + [char](34) + ", TODAY(), IF (G$i = " + [char](34) +"Offline"", TODAY(), " + [char](34) +")))"
    $Main.Cells.Item($i, 1) = $W.Workstation
    $Main.Cells.Item($i, 2) = $W.VulnCount
    $Main.Cells.Item($i, 3) = $W.OS
    $Main.Cells.Item($i, 4) = $W.AuditID
    $Main.Cells.Item($i, 5) = $W.Name
    $Main.Cells.Item($i, 6) = $W.Fix
    $Main.Cells.Item($i, 7) = "Open"
    $Main.Cells.Item($i, 9) = $DateFunction
    $TBString = "{0},{1}" -f $W.Workstation, $W.AuditID
    $Main.Cells.Item($i, 12) = $TBString
    $i++
    $ActiveWorkbook.SaveAs($NewFile)
    $ExcelObject.Quit() | Out-Null
    [System.Runtime.Interopservices.Marshal]::ReleaseComObject($ExcelObject)
    Stop-Process -Id $ExcelId -Force -ErrorAction SilentlyContinue
    If someone can help me figure out how to add this custom excel function. When I run the function everything gets filled out but the date function.

    Try this instead:
    $DateFunction = "=IF (G$i = `"Mitigated`", TODAY(), IF (G$i = `"Escalated`", TODAY(), IF (G$i = `"Offline`", TODAY(), `"`")))"
    You can just escape the " with a backtick ` you don't need + [char](34) +
    You were also missing a double-quote at the end of the formula which is probably what was causing the problem.
    I hope this post has helped!

  • Adding "Filter Criteria" to the XSLT List View Web Part impact on "Export to Excel" functionality within Document Library

    Hi there,
    XSLT List View displaying all the list items within the Document Library. In order to implement the Search functionality within Document library out of box "Text Filter" web part is configured as explained below. The solution is similar to
    the one suggested at
    http://www.wonderlaura.com/Lists/Posts/Post.aspx?ID=77
    "Text Filter" Web Part added to the page.
    Filter Criteria (i.e., XSLT List View columns) added to the XSLT List View where the filter parameters take the input from the "Text Filter" Web Part .
      3. Both Web Parts (XSLT List View and the Text Filter) are connected.
    When the search criteria is entered into the "Text Filter" Web Part, it is passed to the relevant Columns of the XSLT List View and the documents (List Items) that match the search criteria are shown within XSLT List View.
    Search functionality working as expected.
    Query: Selecting the "Export to Excel" icon from the ribbon generates the excel spread sheet with no data except Column Titles from the Document library. In the investigation it is
    found that adding the 'Filter Criteria' on XSLT List View is causing this bug. When the Filter Criteria is removed, then "Export to Excel" functionality is working as expected.
    But it is mandatory to add "Filter Criteria" to implement the search functionality with in the document library.
    Help: Help/input appreciated on the work around to get the "Export to Excel" functionality work when the "Filter Criteria"
    exist on the XSLT List View.
    Regards,

    Once again thanks very much for your help Scott. very much appreciated.
    In the investigation it is found that removing the 'Filter Criteria' on XSLT List View makes the "Export to Excel" functionality work. But the 'Filter Criteria' is mandatory to get the 'Document Search' functionality.
    I think that due to technical limitations it should be concluded that 'only custom development can make all work, no code solutions using the SharePoint Designer can meet all the requirements.
    If you can think of any alternative solution that could help in resolving the current issue or fix the issue without any custom implementation please inform. Otherwise this issue would be marked as resolved with your suggested response.
    Regards,

  • Smartview 9.3 version performing excel functions like addition

    Hello All,
    Is it possible for me to add up more than one account in a single cell within smartview for hyperion and if so how do i go about it. For example, I want to add up two inventory accounts (Member selection-Account) and show the total in one cell for a particular entity (member selection-Tier) for a given market (member selection-Custom 1). I cant come up with the solution. I dont know if it is something that the query designer or function member can do. I am a regular user and dont have admin rights. thanks, Aby

    You would need to use Excel functionality for this. You can use cell functions with Excel formulas to just bring both member on the grid and then use excel formulas.

  • Custom VBA Functions BPC

    Hello,
    I would like to know how to use custom VBA function in BPC. I read the administration guide but I didn't understand this part.
    For instance, if I want to use the "BEFORE_REFRESH" function, where do I have to implement it ?
    Thanks in advance

    Hello Mark,
    I've also used BPC VBA functions quite extensively to extend BPC capabilities with success up until now, but I am now struggling with finding a way to make them work when registered as macros from an external add-in.
    The scenario is the following: I currently leverage custom VBA macros (BEFORE_EXPAND, AFTER_EXPAND, etc) to extend BPC functionalities, and the code is distributed in the VBA modules attached with my input schedules/reports spreadsheets.
    I then decided to consolidate the functionalities in an Excel automation add-in, which (among other tasks) registers the same macros once at Excel startup to be used by all the different input schedules / report: macros are registered and exposed correctly (they are showing up in the list of available functions) but for some reasons they are not fired by the Expand All or Refresh menu actions.
    Any idea about why the macros are not executed? Do they necessarily need to be written in a VBA module attached to the spreadsheet?
    Many thanks in advance.
    Regards
    Jacopo

  • BPC Custom VBA Functions questions

    Hello, Experts
    I am developing some formatting scripts which are run inside functions AFTER_EXPAND, AFTER_REFRESH.
    I have several sheets with EVDRE
    I don't understand the following things:
    1. How I can trigger which list was refreshed & expanded?
    2. Why calling EVDRE : Expand & Refresh doesn't lead to execution AFTER_EXPAND and AFTER_REFRESH? AFTER_REFRESH work only in Refresh, AFTER_EXPAND in Expand all. How can I trigger calling "EVDRE : Expand & Refresh "
    3. BPC Custom VBA Functions have String argument inside itselves. Usually this argument is empty. What's the goal of this argument?

    Hello Mark,
    I've also used BPC VBA functions quite extensively to extend BPC capabilities with success up until now, but I am now struggling with finding a way to make them work when registered as macros from an external add-in.
    The scenario is the following: I currently leverage custom VBA macros (BEFORE_EXPAND, AFTER_EXPAND, etc) to extend BPC functionalities, and the code is distributed in the VBA modules attached with my input schedules/reports spreadsheets.
    I then decided to consolidate the functionalities in an Excel automation add-in, which (among other tasks) registers the same macros once at Excel startup to be used by all the different input schedules / report: macros are registered and exposed correctly (they are showing up in the list of available functions) but for some reasons they are not fired by the Expand All or Refresh menu actions.
    Any idea about why the macros are not executed? Do they necessarily need to be written in a VBA module attached to the spreadsheet?
    Many thanks in advance.
    Regards
    Jacopo

  • How to Implement custom share functionality in SharePoint 2013 document Lib programmatically?

    Hi,
    I have created custom action for Share functionality in document library.
    On Share action i'm showing Model pop up with Share form with addition functionality.
    I am developing custom share functionality because there is some addition functionality related to this.
    How to Implement custom share functionality in SharePoint 2013  document Lib pro-grammatically?
    Regards,
    - Siddhehswar

    Hi Siddhehswar:
    I would suggest that you use the
    Ribbon. Because this is a flexible way for SharePoint. In my project experience, I always suggest my customers to use it. In the feature, if my customers have customization about permission then i can accomplish this as soon
    as possible. Simple put, I utilize this perfect mechanism to resolve our complex project requirement. Maybe we customize Upload/ Edit/ Modify/ Barcode/ Send mail etc... For example:
    We customize <Edit> Ribbon. As shown below.
    When user click <Edit Item>, the system will
    render customized pop up window.
    Will

  • Is it possible to throw a BPELFault from a custom xpath function?

    I'm probably revealing my lack of java chops here, but I'd like to know if there's a way to throw a BPELFault from the "call" method within a custom xpath function.
    The interface for IXPathFunction seems to dictate that "call" throws only an XPathFunctionException and the bpel server doesn't handle this exception properly. It records the exception in the logs but then the process just dies.
    Right now I have this (simplified code):
    public Object call(IXPathContext context,
    List args) throws XPathFunctionException
    if (args.size() == 1)
    // do some stuff and return a value
    throw new XPathFunctionException( "hexToInt() requires one string argument." );
    What I want to have is something like this:
    public Object call(IXPathContext context,
    List args) throws BPELFault
    if (args.size() == 1)
    // do some stuff and return a value
    BPELFault fault = new BPELFault(
    new javax.xml.namespace.QName("http://schemas.xmlsoap.org/ws/2003/03/business-process/",
    "selectionFailure"));
    fault.setPart("code", "intToHex");
    fault.setPart("summary", "hexToInt() requires one string argument.");
    throw fault;
    If I do this, the compiler rejects it saying that "call" must throw XPathFunctionException. Is there a way to extend the IXPathFunction interface to allow it to throw a useful fault?
    Thanks!
    Sean

    Yeah, I'm using that patch (otherwise the process just crashes and you don't have a chance to catch the fault, even in a catchAll). Within the catchAll you can get the details from the error with something like this:
    <copy>
    <from expression="concat(ora:getFaultName(),'')"/>
    <to variable="processFault" part="payload" query="/ns4:summary"/>
    </copy>
    <copy>
    <from expression="concat(ora:getFaultAsString(),'')"/>
    <to variable="processFault" part="payload" query="/ns4:detail"/>
    </copy>

  • How can I call a custom javascript function when clicking on cfgrid cell.

    I would like to call a custom javascript function when
    clicking on a cell in an cfgrid (of html format). The closest thing
    I can find is to use the HREF="" attribute, but it doesn't seem to
    work with javascript inside it.
    Simple example:
    <cfgridcolumn name="Foo" header="Foo"
    href="javascript:customFunction(#ID#);">
    Do I need to tap into the underlying Ext JS funtionality? If
    so, where can I start?
    Thanks!

    Hi,
    According to your post, my understanding is that you want to hide/show list columns based on specify the permission for Users, SharePoint Groups or Active Directory Groups.
    Here is a solution from CodePlex for your reference:
    SharePoint 2013 Column & View Permission
    https://sp2013columnpermission.codeplex.com/
    Best Regards
    Dennis Guo
    TechNet Community Support

  • Excel Function to query BW using Web Services API

    Hello,
    I need to write an Excel function as an .XLA that will do the following:
    It will be invoked like any other Excel function. E.g. =GetCost(param p1, param p2)
    This function queries an InfoCube and must return a single numerical value for the Cell in Excel that the function is used in.
    I have never done anything like this before. I have done a decent amount of reading to discover the best way to attack this. It seems like the best way to create this functionality is to:
    1. create a web service in a BW function group with a function module that is RFC enabled.
    2. I'm thinking the function module will use native SQL to query the InfoCube and pull the value and then somehow pass this value to a web service.
    3. The value in the web service will be accessed through it's API in Excel/VBA.
    I am not sure if this is best way to do this, or if it is even possible to do it this way. I was wondering if anyone could tell me if I am heading down the right path and possibly direct me to a tutorial or other information that would aid in accomplishing this. I have yet to find some type of proof of concept from beginning to end on how to do something like this. Any help would be greatly appreciated.
    These are the documents I have found insightful so far:
    How to build an XLA: http://www.fontstuff.com/vba/vbatut03.htm
    If you can read a table and dump it into Excel then you can query an InfoCube? https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c043d836-166c-2910-b99e-ae3633dec547
    How to view a webservice homepage: http://help.sap.com/saphelp_nw04/helpdata/en/1c/472e22c45cc94599ab3725bc9558d2/content.htm
    How to create a webservice:
    http://help.sap.com/saphelp_nw04/helpdata/en/9b/dad1ae3908ee44a5caf57e10918be9/frameset.htm
    What I am missing is how to pass data from the function module to the webservice, and from the webservice to the Excel/VBA code.
    Thanks!
    -Gary

    /bump

  • Error while creating Custom Defined Functions in Essbase

    <p>Hi All,<br>I am trying to create CDF(Custom Defined Functions) in Essbase. Iwant to create a function which take list of child member andreturn the first child. For this, i have created a java file called"ChildAccess.java" which contains the following code:<br>public class ChildAccess<br>{<br>public static char GetFirstMember(char [] members)<br>{<br>return members[0];<br>}<br>}<br>I have compiled and made jar file called"ChildAccess.jar" and pasted it at"ARBORPATH/java/udf". Then i restarted the Essbase Serverand run the following MaxL command to register the function<br>create or replace function '@ChildAccess' as<br>'ChildAccess.GetFirstMember'<br>spec '@ChildAccess(memberRange)'<br>comment 'adds list of input members'.<br>Till here i am not getting any error but when i am using thisfunction in my calc script as given below<br><br>FIX(@ChildAccess(@CHILDREN("Abc")))<br><br>it gives the following error<br>"Error:1200414 Error parsing formula for [FIX STATEMENT]<br>(line 2)"argument[1] may not have size[6] in function[@CHILDREN]"<br>NOTE: The SIZE[6] is giving the no. of child in member"ABC".<br><br>Thanks in Advance<br>Arpit</p>

    If you want to use the CDF in a FIX statement you need to make sure that it returns a member name rather than a number:<BR><i><BR>public class ChildAccess<BR>{<BR>    public static String GetFirstMember(String[] members)<BR>    {<BR>        return members[0];<BR>    }<BR>}<BR></i><BR>I prefer to define the function against a specific application rather than globally because you only need to restart the application in order to pick-up any modifications to the .jar file. So the MaxL function definition would be:<BR><i><BR>    create or replace function appname.'@_GETFIRSTMEMBER' as<BR>        'ChildAccess.GetFirstMember(String[])';<BR></i><BR>and in the calculation script the FIX statement would become:<BR><i><BR>    fix ( @member( @_GetFirstMember( @name( @children( "Abc" ) ) ) ) )<BR></i><BR>This looks a little messy so you can use a macro to simplify it:<BR><i><BR>    create or replace macro appname.'@GETFIRSTMEMBER'(single) <BR>        as '@member( @_GETFIRSTMEMBER( @name( @@1 ) ) )' <BR>        SPEC "@GETFIRSTMEMBER(memberRange)";<BR></i><BR>and then the FIX statement could be written:<BR><i><BR>    fix( @getfirstmember( @children( "PRODUCT" ) ) )<BR></i>

  • Bpel Server Does Not Catch Exceptions Thrown By Custom Xpath Functions

    Hi.
    I am using some custom xpath functions in a bpel process and whenever they fail I get an XPathExecutionError with summary:
    XPath expression failed to execute.
    Error while processing xpath expression, the expression is "<my function>", the reason is FOTY0001: type error.
    Please verify the xpath query.
    I am forcing my function to fail by giving a wrong input, which should result in an XPathFunctionException("Input does not respect format").
    There is a note on Metalink with ID 458434.1 on this subject which says that patch 5926809 should fix my problem.
    Patch 5926809 fixes Bug 5926809 - ORA:PARSEESCAPEDXML XPATH EXPRESSION FAILED TO EXECUTE FOTY0001: TYPE ERROR.
    I am using it, but it does not work :(
    I am using version 10.1.3.3.0 of App Server with various patch sets, including fix for bug 5926809.
    Has anyone suggestions on how to overcome this problem?
    Thanks

    Hello,
    I am trying to add a custom xpath function to the BPEL server, and I see that you made it work. I am using Oracle SOA Suite 10.1.3.3 and jDeveloper 10.1.3.4. I am using this function inside an xsl mapping file, although I am able to compile and deploy the Bpel Process to the server, it stops mapping where I placed the function and I have not seen any meaningful message from the domain/log/ files.
    Can you tell me how you did it?
    I think you will tell me faster than Oracle support, I already placed an SR but they just give me superficial advice.
    I appretiate your time and advice,
    Guillermo

  • Cfspeadsheet not picking up data from cells using excel function indirect

    I am receiving data from comany executive in a sreadsheet and trying to post selected data to a company intranet by reading the data using cfspreadsheet.  for the most part, cfspeadsheet works, however, this speadsheet is rather complicated.  The spreadsheet uses the excel indirect function to determine which data to post.  When I read this cell, or any cell dependent on it, with SpreadsheetGetCellValue, if get the cell formula instead or the calculated value for the cell.  Is this function not supported by cold fusion?
    Is there any way around this?
    Is the a list somewhere of which Excel functions are or are not supported?

    Thanks for your reply...
    it is now displaying data in independent cells , but is it possible to add multiple headings in that excel sheet.
    ex
    Heading 1
    heading 2
    Column Headings-------
    Is it possible to do that way?? for column headings i think we need to pass in fields parameter of Tables...
    can we include multiple headings???
    Thanks for help..

  • BusinessObjects SDK - Save as Excel functionality

    Hi Experts,
    I have a question for anyone experienced with the SDK and the BOBJ apis. We are presenting WEBI reports to Partners, so we want to display the reports without the toolbars and only show the reports. We do not want to confuse them will all the extras :). We have done this, but, we have now been asked to provide the "save as excel" functionality to the users while still keeping all the toolbars hidden. So our goal is to just add our own button that will call the same functionality as file -> save as excel. Does anyone know if there is a specific function we can call from the apis that will perform this action?
    Second, and not sure if this is possible or not (hope it is). We also have some xcelsius reports displayed to the user in flash. We would also like to add the same functionality, giving the user the ability to click a button and save as excel. Does anyone know if there is a specific function within the xcelsius specific classes that would allow us to do this as well?
    Thanks!
    -Kevin

    Hi Kevin,
    If you are using the Business Objects Enterprise BI 4.0 then you can modify the crystal report viewer format list where you  can export to any particular format.
    Please refer to the below mentioned Blog by Ted Ueda :
    [SAP BusinessObjects Enterprise BI 4.0 - Modify the Crystal Reports Viewer Export Format List|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/22845]
    As mentioned, you could only allow  the excel format to be exported by your customers.
    Regards,
    Rameez Shaikh

  • Custom XSLT Functions Throw Exception

    Hi,
    I have following requirement-
    1. I have defined and configured some custom XSLT functions in Jdev and BPEL, which throw exception in case of an error.
    2. Now I want to catch that exception in my BPEL process
    3. In My BPEL process I have defined transformation step ( which is using those Custom XSLT functions) in a scope and added a catch branch to that
    4. But even XSLT java function throw an exception , it is not being catch by catch branch.
    Could you please help me regarding this and tell me any other way to catch an exception in BPEL process thrown by Custom XSLT function within transformation step?
    Thanks.

    Hi,
    Its the problem with the date. In the configuration file i used dateTime for java.util.Date, because of this i cant see "User Defined" option in Jdeveloper component pallete. I checked at XML data types i had seen dateTime for java.util.Date Class, but its not working.
    Do anyone created a custom xslt function which has date as parameter or return type?, If so wht they had used as data type for xml and java.
    Thanks,
    RR

Maybe you are looking for