FarPoint Forums

The FarPoint Message Boards
Welcome to FarPoint Forums Sign in | Join | Help
in Search

PercentCellType

Last post 05-12-2008, 5:39 PM by scotts. 6 replies.
Sort Posts: Previous Next
  •  05-07-2008, 4:11 PM 63128

    PercentCellType

    When exporting columns defined as PercentCellType, I am seeing different behavior, depending on whether the column was added via the designer, or at runtime (using AddColumns() method). If the column was added via the designer, I get the desired behavior, w/ 2 decimal digits displayed in both Spread and Excel. If the column was added at runtime, I see 2 decimal digits displayed in Spread, but 0 decimal digits displayed in Excel. This is true even when setting the cell type and decimal digits explicitly at runtime.

    Can someone tell me if this is a bug, or if there is some additional parameter I am missing when adding the column at runtime?

    Thanks,

    Troy

  •  05-07-2008, 4:50 PM 63132 in reply to 63128

    Re: PercentCellType

    Troy,

    What release of Spread for Web Forms are you using? I tested with the latest maintenance release and the resulting Excel file showed 2 decimal places whether I setup the PercentCellType in code or the Spread Designer.


    Scott S.
    FarPoint Technologies, Inc.
  •  05-07-2008, 4:54 PM 63134 in reply to 63128

    Re: PercentCellType

    Interestingly, this problem may be related or triggered by setting the column background color at runtime, believe it or not. If the column background color is set at runtime, the problem occurs. If I remove the background color, then Excel displays the correct number of digits. Somehow, it appears that the background color may be affecting the number formatting info passed to Excel. Strange.

    Troy

  •  05-07-2008, 5:00 PM 63135 in reply to 63132

    Re: PercentCellType

    I am using version 3.0.1007.2002. Also, the problem may not be entirely consistent. In some sheets, the data appears to export fine, while other sheets show the problem.

    Troy

  •  05-08-2008, 12:36 PM 63195 in reply to 63135

    Re: PercentCellType

    Troy,

    Can you find any differences between the sheets that export this data correctly and the ones that do not? Are either or both of the SheetViews bound to a DataSource? If they are, what type of field are you binding this column?

    Setting another style on the cell should not cause the formatting to fail. Could you post a small zipped project reproducing this issue for us to debug?


    Scott S.
    FarPoint Technologies, Inc.
  •  05-09-2008, 3:23 PM 63283 in reply to 63195

    Re: PercentCellType

    Attachment: FPTest.zip

    The zipped project is attached. After clicking the export button, note that the 2nd column in the grid does not export w/ the correct number of decimal digits. It appears to incorrectly inherit the number of decimal digits from the 1st column.

    Thanks,

    Troy

  •  05-12-2008, 5:39 PM 63389 in reply to 63283

    Re: PercentCellType

    Troy,

    I was able to reproduce this issue and have reported this as a bug (#22483) for the development team to fix for the next maintenance release. The issue is with having multiple PercentCellType cells with different DecimalDigits set for each. The setting on the first cell is used for all cells.


    Scott S.
    FarPoint Technologies, Inc.
View as RSS news feed in XML
     FarPoint Forums Home