SUM formula not carried over to Excel XLS file

Posted by: support on 5 April 2018, 1:03 pm EST

  • Posted 5 April 2018, 1:03 pm EST

    Have been using Spread COM version 7.0.55 for many years but am puzzled as to why the Spread control behaves in a particular way. The scenerio is this:

    In our software there is code that makes a call to SetFormula() using the value, "SUM(C2:C14)". Visually the grid displays to correct total as a number, but when attempting to export the grid contents to an XLS file (via a call to ExportToExcel) the following lines appear in the corresponding log file:

    3 15 167:Custom functions are not exported to Excel.
    3 15 175:Excel does not support the Spread static text cell type. The value of the Spread cell has been placed in the corresponding Excel cell, but the cell formatting has been discarded.

    What I read from the documentation:
    "Formula - Excel uses the formulas from Spread, except as noted.
    The following functions are not exported to Excel:
    PMT (log message 163)
    Custom functions (log message 167)"
    .
    .
    .

    Even though I know that "=SUM()" is a valid Excel formula, am I to believe that the Spread COM's SUM formula is a custom formula and will not carry over to Excel as is? If so is there is some way within the Spread COM to have a formula totaling for a range of cells carry over as is to an Excel XLS file?

    Any help is greatly appreciated.
  • Replied 10 April 2018, 2:49 am EST

    Hello,

    I am not able to replicate this issue at my end. Please refer to the attached sample application.
    The attachment also contains the exported Excel file.

    Thanks,
    Deepak SharmaSpreadFormulaCheck.zip
  • Replied 26 April 2018, 3:22 pm EST

    Thanks for the sample code. Unfortunately cannot use because I code in C++ with the MFC framework and not VB. Any other suggestion?
  • Marked as Answer

    Replied 30 April 2018, 9:01 am EST

    Hello,

    I tested it with one of the installed samples and could not replicate the issue. I would suggest to test this issue with the Spread 8 COM latest version and let me know if the issue can still be reproduced.

    Thanks,
    Deepak Sharma
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels