IAdviseSink::OnDataChange not called when copy/pasting Excel cells

Symptoms


Linked data may not update in the container application when you paste cells.
IAdviseSink::OnDataChange is not called in the following scenario:
  • Excel is in manual calculation mode
  • The user copies an Excel range and pastes it into the linked range

Cause

Excel calls IAdviseSink::OnDataChange when the cell is calculated. Excel will calculate a cell to determine its data type if a user enters information into the cell or pastes information from an external source. If you copy cells from Excel and paste them into Excel then the data type is already known, Excel will then wait for the calculation enginer to calculate the cells with the next calculation pass.

Workaround

Calculate the workbook by using F9.
Turn calculation to automatic.
Edit and re-enter the cell to have Excel determine the data type.

More Information

IAdviseSink::OnDataChange method
http://msdn.microsoft.com/en-us/library/windows/desktop/ms687283%28v=vs.85%29.aspx

Propiedades

Id. de artículo: 2768406 - Última revisión: 4 oct. 2012 - Revisión: 1

Comentarios