Page 1 of 1

Notes in Excel2007

Posted: Tue Apr 16, 2013 10:36 am
by Roman55
Hello

Please provide an example to add note to a cell. For Excel97, the following code works:

Code: Select all

  Result := xlsRW[0].Drawing.BIFFDrawing.Notes.Add;
  Result.Text := text;
BIFFDrawing is nil for Excel2007 mode, so I can't use it. Samples directory has an example called "Comment" that works for Excel2007:

Code: Select all

XLS[0].Comments.Add(1,4,'Hello,world')
but when I change version to Excel97, there are no commented cells in output file at all.

What is the correct way? Is there a proper code for both writing modes?

Tested on version 5.10.16.

Re: Notes in Excel2007

Posted: Wed Apr 17, 2013 7:53 am
by larsa
Hello

You have to choose method depending on which excel version you want to create notes for. This will be fixed in a later update.