KetilO,

I'm using your spreadsheet control, Version 0.0.0.5 dated 3 June 2003. Everything was working great until, I wrote a routine to write a report based on the contents of a spreadsheet. In the routine I use SPRM_GETCELLDATA. Number cells with decimal places--or just a decimal point--show up fine, but when the contents of a cell are changed, if the number isn't entered with a decimal, the GETCELLDATA message returns a 0.0 no matter what the contents are! This is for FLOAT type cells.

The numbers on the screen and recalculations based on the numbers are all correct, just not the GETCELLDATA results. I tried using GETCELLTYPE to see if the type changed, but GETCELLTYPE doesn't seem to work for me, even after immediately setting the cell contents and type. The return value from GETCELLTYPE always returns zero.

Is there something I might be doing wrong, or some error checking I might be able to do before getting the data.

Thanks for any help, and thanks a Lot for the spreadsheet.

farrier
Posted on 2003-08-24 20:04:02 by farrier
Hi farrier

You must check the returned type. It can be an integer.
I will check whats wrong with SPRM_GETCELLTYPE.

Included is a little test to show how.

KetilO
Posted on 2003-08-25 02:32:21 by KetilO
KetilO,

Thanks!!

farrier
Posted on 2003-08-25 02:44:32 by farrier
Where does one obtain a copy of KetilO's Spreadsheet control?
Posted on 2003-08-25 20:27:11 by msmith
Hi msmith

It can be found on my website.

KetilO
Posted on 2003-08-26 01:52:48 by KetilO
KetilO,

From my experiments it appears that when getting the cell contents from a cell with a formula, the results are always 'float' (Using SPRM_GETCELLDATA)

Is that correct? Even when just adding 2 integers?

Thanks,

farrier
Posted on 2003-08-29 06:32:15 by farrier
Hi farrier

Correct.

KetilO
Posted on 2003-08-29 08:48:27 by KetilO
KetilO,

Thanks again!

This is helping me alot!

farrier
Posted on 2003-08-30 01:05:28 by farrier