Posted 8 September 2017, 2:15 pm EST
I have a report generator that creates reports in FarPoint for Windows Forms v4 using Excel templates. Once the report is completed, it is saved to a MemoryStream using the SaveExcel method, the memorystream is then converted to a ByteArray and stored in a database. To open a report, the ByteArray is converted back to a memorystream and then opened with the OpenExcel method. On the report, cells with a value of 0 are shows as "-". I did this using a GeneralCellType and setting the .FormatString = "$#,##0.00;($#,##0.00);-;".
Unfortunately once the report is opened, all the cells that should show "-" actually show 0's. Somehow the OpenExcel method removes or forgets the original format string set for the cell. If I save the memory steam to a file everything shows up as intended, but if that memory stream is opened with the OpenExcel method the formatting is gone.