NOTE: Comment Associated with a Cell (1Ch)

The NOTE record specifies a comment associated with a particular cell. In Microsoft Excel 95 (BIFF7) and earlier versions, this record stores a note (cell note). This feature was significantly enhanced in Microsoft Excel 97, so the name was changed to comment.

Record Data BIFF8

Offset

Name

Size

Contents

4

rw

2

Row of the comment

6

col

2

Column of the comment

8

grbit

2

Options flag (see table below)

10

idObj

2

Object id for OBJ record that contains the comment

12

stAuthor

var

Name of the original comment author


The grbit field contains the option flags listed in the following table.

Bits

Mask

Name

Contents

0

0001h

(Reserved)

Reserved; must be 0 (zero)

1

0002h

fShow

= 0 if the comment is hidden (default)

15 – 2

FFFCh

(Reserved)

Reserved; must be 0 (zero)


The rw and col fields specify the cell that contains the comment. The rw field contains the 0-based row number; the col field contains the 0-based column number.

The idObj field denotes the id of the graphic object (OBJ record) that contains the comment. Each comment has a corresponding OBJ record in which the ot field specifies the object type as Comment Shape. The text of the comment (as well as the formatting information) is in the corresponding OBJ record and its supporting records.

The stAuthor field contains the name of the original author of the comment, as a byte-counted string; the count is an unsigned short (2 bytes) that precedes the string. The string itself is padded with NULL bytes until it is word-aligned. The NULLs appear after the count and before the string data.

Record Data BIFF7 and earlier

Offset

Name

Size

Contents

4

rw

2

Row of the note

6

col

2

Column of the note

8

cch

2

Length of the note (bytes)

10

rgch

var

Text of the note


The cell is denoted by the rw and col fields. The rw field contains the 0-based row number. The col field contains the 0-based column number.

The cch field contains the length of the note in bytes. The rgch field contains the text of the note in ASCII format.

Notes longer than 2048 characters (bytes) must be divided into several NOTE records, with each record containing no more than 2048 characters. In this case, the first NOTE record contains the fields listed in the following table.

Offset

Name

Size

Contents

4

rw

2

Row of the note

6

col

2

Column of the note

8

cch

2

Total length of the note

10

rgch

2048

First 2048 characters of the note


Each successive NOTE record contains the fields listed in the following table.

Offset

Name

Size

Contents

4

rw

2

= –1 always (FFFFh)

6

(Reserved)

2

Reserved; must be 0 (zero)

8

cch

2

Length of this section of the note

10

rgch

var

This section of the note