Excel Buffer Number Format

Hi,

Has anybody tried exporting Amount value in Excel using Excel Buffer (NAV 2016) ?

I need the amount to be formatted like 307,909.44, 199,675.32 etc…

I tried below codes :

  1. EnterCell(ExcelRowNo,3,Amount,TRUE,FALSE,FALSE,’’,CellType::Text) : Exports Amount in the required format but it is text.

  2. EnterCell(ExcelRowNo,3,Amount,TRUE,FALSE,FALSE,’’,CellType::Number) : Amount is not formatted as required

Function : EnterCell(RowNo ; ColumnNo ;CellValue ;Bold ;Italic;UnderLine;NumberFormat ;CellType )

Hello,

Try

EnterCell(ExcelRowNo,3,Amount,TRUE,FALSE,FALSE,‘0**[Thousand Separator]**00’,CellType::Number)

EnterCell(ExcelRowNo,3,Amount,TRUE,FALSE,FALSE,‘0,00’,CellType::Number)

best regards,

Thank You… If the value of cell is 0 then it is displayed as ‘000’. Any solution for this ?

if Amount <> 0 then
EnterCell(ExcelRowNo,3,Amount,TRUE,FALSE,FALSE,‘0,00’,CellType::Number)
else
EnterCell(ExcelRowNo,3,Amount,TRUE,FALSE,FALSE,’’,CellType::Number);