Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1225
Exporting summary as text
posted

I have a custom summary displayformatter where I take the input, which is number of seconds, and convert it to a text representation of days/hours/minutes/seconds.  For example 11340 becomes "0003h:09m:00s".

I am trying to export the text representation of that and not the 11340. I have tried both the SummaryCellExporting and SUmmaryCellExported wich this code...

if

 

(e.Summary != null)

{

 

e.CurrentWorksheet.Rows[e.CurrentRowIndex].Cells[e.CurrentColumnIndex].Value = e.Summary.SummaryText.ToString();

}

Yet it still exports 11340 as the value in the cell.  What do I need to do to have it export the text?

Parents
  • 469350
    Offline posted

    The code you have here should work in the SummaryCellExporter event (although it will not work in SummaryCellExporting). The only reason I can think of why this would not work is if the summary is being calculated with a formula. In that case, the Formula may be overriding the Value on the cell. Check the Excel file and see if there is a formula on the cell. If so, you will need to also remove the formula in addition to setting the Value.

Reply Children
No Data