locked
C-Api and getting number format RRS feed

  • Question

  • Hello,

    is there a way to get the numberformat of a given cell with the use of the C-Api inside a normal function.

    I know, that there's xlfGetCell, but this doesn't work inside a normal function.

    I have found the functions xlfCell and xlfNumberstring, but I don't have any Information about them.

    [I don't see any related function in MacroFun]

    Any hints ?

      Hendrik Schmieder

    Thursday, July 7, 2016 12:30 PM

Answers

  • Found more out

    Numberstring is a undocumented Excel function (mabye part of Analysis packet) whcih is there for backward compatiblity to Lotus 1-2-3

    http://www.mrexcel.com/forum/excel-questions/22201-numberstring-function-previous-excel-version.html

    So xlfnumberstring does definitly not what I originally expected.

    And the return xlfcell is not the one I hoped for.

    So it looks like xlfgetcell is the only useable function for this, but this only works for macro sheet functions and commands.

    So it looks like  thsat the answer to the original question is :

    It is not doable for normal functions.

    • Marked as answer by h_schmieder Tuesday, July 12, 2016 12:25 PM
    Tuesday, July 12, 2016 12:25 PM

All replies

  • Hi h_schmieder,

    you had asked about any related Macro Function.

    so here you can use Range.NumberFormat Property (Excel).

    use the code below to get example of that.

    Sub demo()
    Dim CellFormat As String
    CellFormat = Range("A1:A1").Value & " " & Range("A1:A1").NumberFormat
    Debug.Print CellFormat
    End Sub
    

    you will get output like below.

    For more information regarding Range.NumberFormat please visit the link below.

    Range.NumberFormat Property (Excel)

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, July 8, 2016 4:02 AM
  • Hello,

    I know how to this from VBA.

    But the question was how to this within a XLL with the help of the C-Api inside a non macro sheet functions (not registered with #).

      Hendrik

    Friday, July 8, 2016 9:28 AM
  • Hi h_schmieder,

    This Forum only supports the issue regarding Excel Object Model, with Macro and VBA.

    you have a requirement of C Api. for this platform we don't have information.

    it is better that you raise an issue on C Api Forum.

    I will also try to connect with c++ team to discuss regarding this. if they have information regarding this then I will try to move this thread to c++ Forum.

    so that you can get suggestions regarding your issue.

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, July 11, 2016 8:56 AM
  • Hi h_schmieder,

     I had contact that forum and they said that they need more information regarding the issue.

    so can you able to provide more information regarding your issue.

    it is better that you can provide the code that you are trying to develop.

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, July 11, 2016 9:25 AM
  • OK,

    it Looks like there's a big misunderstanding.I don't speak about Windows C-Api or Visual Studio C-Api.

    I'm speaking about the Excel C-Api as part of the Excel 2010 SDK to be used in a XLL.

    [<ttps://www.microsoft.com/en-us/download/details.aspx?id=20199>]

    xlfCell is propably the same as the normal Cell function, but still no docu for xlfNumberstring.

    So unless there's a spcific Forum for XLL devel question this Forum is the best suited.

      Hendrik Schmieder

    Monday, July 11, 2016 10:56 AM
  • Hi h_schmieder,

    I am going to include senior engineers to look in to this issue.

    after this they will suggest you a suitable suggestion for your issue.

    it will take some time so be patient till they contact you and try to suggest you a solution for your issue.

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, July 12, 2016 8:16 AM
  • Found more out

    Numberstring is a undocumented Excel function (mabye part of Analysis packet) whcih is there for backward compatiblity to Lotus 1-2-3

    http://www.mrexcel.com/forum/excel-questions/22201-numberstring-function-previous-excel-version.html

    So xlfnumberstring does definitly not what I originally expected.

    And the return xlfcell is not the one I hoped for.

    So it looks like xlfgetcell is the only useable function for this, but this only works for macro sheet functions and commands.

    So it looks like  thsat the answer to the original question is :

    It is not doable for normal functions.

    • Marked as answer by h_schmieder Tuesday, July 12, 2016 12:25 PM
    Tuesday, July 12, 2016 12:25 PM