Quantcast
Channel: Excel IT Pro Discussions forum
Viewing all articles
Browse latest Browse all 11829

Excel 2013 hosting in WPF using HwnHost

$
0
0

Excel 2013 is being hosted in WPF using HwndHost Type. A class is inherited from HwnHost Type and BuildWindowCore method is overridden in inheriting type. In BuildWindowCore method, an MDIWindow has been created by calling CreateWindowEx method of user32 dll. This Window is set as parent for Excel 2013 Workbook Window. Now this Excel window is visible under content control of WPF. User is allowed to edit cells in the visible window of Excel and also writing operations are happening on Excel object from code.

Problem Description:

  1. On opening Excel workbook in WPF window, when user edit cells which are under UsedRange of Excel Workbook, Excel stops working and crashed.
  2. If User edit cells outside UsedRange, User edit cells successfully.
  3. Sometimes Context menu doesn’t work properly on hosted Excel workbook. When user clicks any command on Context Menu, nothing happened.
  4. Why Excel 2013 Workbook window cannot be made Child Window by apply Child Window Style. On Applying Child window Style, SetWindowLong throws exception. This is not the case with Excel 2010.

These problems does not exist on Excel 2010 or Excel 2007.


Viewing all articles
Browse latest Browse all 11829

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>