Offset | Name | Size | Contents |
4 | rw | 2 | Row number |
6 | col | 2 | Column number |
8 | ixfe | 2 | Index to the XF record that contains the cell format |
10 | rk | 4 | RK number (see the following description) |
RK type | Encode priority | Number (decimal) | RK number (hex) | Description of 30-bit encoding |
0 | 1 | 1 | 3F F0 00 00 | IEEE number |
1 | 3 | 1.23 | 40 5E C0 01 | IEEE number x 100 |
2 | 2 | 12345678 | 02 F1 85 3A | Integer |
3 | 4 | 123456.78 | 02 F1 85 3B | Integer x 100 |
double NumFromRk(long rk)
{
double num;
if(rk & 0x02)
{
// int
num = (double) (rk >> 2);
}
else
{
// hi words of IEEE num
*((long *)&num+1) = rk & 0xfffffffc;
*((long *)&num) = 0;
}
if(rk & 0x01)
// divide by 100
num /= 100;
return num;
}
main()
{
printf("%f\n", NumFromRk (0x02f1853b));
}
If you write a NUMBER record to a BIFF file, Microsoft Excel may convert the number to an RK number when it reads the file.