New cell types

Posted by: dror_farhi on 28 August 2018, 11:19 pm EST

    • Post Options:
    • Link

    Posted 28 August 2018, 11:19 pm EST - Updated 30 September 2022, 3:11 am EST

    Hi,

    I have an active x control that I am using on vb6:

    We currently updated this control from vaSpread version: 2.5.0.1, to the new fpSpread version 8.0.28.

    We have a column in the spread control (the fourth column), that it’s values are:

    18

    18

    2

    18

    17

    18

    18

    18

    18

    2

    2

    We have 11 rows.

    We are running the code:

    spread.Col = 4

    spread.Row = 1

    spread.Col2 = 4

    spread.Row2 = 11

    dim s as string = spread.Clip

    In the old control we are getting:

    18

    18

    2

    18

    17

    18

    18

    18

    18

    2

    2

    In the new control we are getting:

    2

    2

    2

    The CellType of this column when we build the grid is:

    spread.CellType = 3 'SS_CELL_TYPE_INTEGER

    Why in the new control we cannot see the numbers of 2 digits: 17 and 18 ?

    When I searched in the internet, I found the attached Spread 8 documentation, that describes all cell types.

    When I compare it to our application cell types I have seen that:

    3 'SS_CELL_TYPE_INTEGER does not exist.

    2 'SS_CELL_TYPE_FLOAT does not exist.

    There is: 15 'Scientific, that I don’t know what it means. What does it mean ?

    I have a lot of code using the cell types: SS_CELL_TYPE_INTEGER and SS_CELL_TYPE_FLOAT. What should I do ? Use the cell type: 13 'Number instead ?

    If I will correct all my application by using 13 'Number instead of 3 'SS_CELL_TYPE_INTEGER and 2 'SS_CELL_TYPE_FLOAT, how will the user see the differences between integer value and floating value ?

    Please answer all my questions.

    Thanks,

    Dror Farhi

  • Posted 29 August 2018, 2:54 am EST

    Hi,

    We have a lot of code using 3 'SS_CELL_TYPE_INTEGER and 2 'SS_CELL_TYPE_FLOAT.

    Something like hundreds of thousands of lines, and our release is on Jan-2019.

    Please try to answer as fast as you can, cause we expected that the new control will behave the same as the old one, and if it’s not, we have a lot of work.

    Thanks,

    Dror Farhi

  • Posted 29 August 2018, 5:27 pm EST

    Hello,

    With Spread 8.0.28 , there is CellTypeNumber which you can use for both float and integers values. For float you can set the decimal for celltype, please go through the documentation given here:

    http://help.grapecity.com/spread/Spread8/WebSiteHelp/webframe.html#cells191.html

    Thanks,

    Deepak Sharma

  • Posted 29 August 2018, 7:29 pm EST

    Hi,

    Thanks for your answer.

    As I said in my previous post, we have hundreds of thousands of lines creating columns on the old way:

    spread.Col = 4

    spread.Row = -1

    spread.CellType = 3 'SS_CELL_TYPE_INTEGER

    spread.Row = 0

    spread.Text = “Column Header”

    spread.ColWith

    I know how to create columns in the new way, but when we bought the new control, we didn’t expect to replace all of our code.

    Please help me:

    Why on some of the places, (not all), after we creating our column as I wrote above, when we run the code:

    spread.Col = 4

    spread.Row = 1

    spread.Col2 = 4

    spread.Row2 = 11

    dim s as string = spread.Clip

    We are getting:

    2

    2

    2

    Instead of:

    18

    18

    2

    18

    17

    18

    18

    18

    18

    2

    2

    Thanks,

    Dror Farhi

  • Posted 30 August 2018, 12:37 am EST - Updated 30 September 2022, 3:11 am EST

    Hi,

    Maybe this post will help you find the problem:

    The code for binding our MyPeakTable (string) to your spread table:

    With sprdPeak

    .Col = 1

    .Row = 1

    .Col2 = 35

    .Row2 = 100

    If MyPeakTable <> “” Then .Clip = MyPeakTable

    End With

    I attached the immediate window in debug after running this code. Over there, you can see that in column 4 the values of 17 and 18 are missing.

    In addition you can see that in column 1 and 3 there are only 3 digits after point instead of 6.

    In all other columns it seems OK.

    What is the problem with columns 1,3,4 ?

    Thanks,

    Dror Farhi

  • Posted 30 August 2018, 1:20 am EST

    Hi,

    I found why there are 3 digits after point instead of 6.

    Please help me with the missing values.

    Thanks,

    Dror Farhi

  • Posted 30 August 2018, 1:46 am EST

    Hi,

    I found the problem.

    There was a bug that was not discovered in the old control.

    Before we set column 4 when sprd.Col is still 3 we are doing:

    .TypeIntegerMax = 10

    instead of

    .TypeFloatMax = 10

    That’s why after that when we set sprd.Col to 4, this Max value still filtered column 4.

    That’s why we cannot see the values 17 and 18.

    Thanks,

    Dror Farhi

  • Posted 4 September 2018, 4:41 pm EST

    Hi Dror,

    Thanks for sharing the solution. Let me know if you need further assistance.

    Regards,

    Deepak Sharma

Need extra support?

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

Learn More

Forum Channels