找回密码
 立即注册

QQ登录

只需一步,快速开始

wn_www

注册会员

4

主题

8

帖子

44

积分

注册会员

积分
44
wn_www
注册会员   /  发表于:2017-8-11 16:34  /   查看:3531  /  回复:5
本帖最后由 wn_www 于 2017-8-11 16:36 编辑

您好! 我将Spread winforms V10 封装到WindowsFormsHost中,再将其用于WPF工程中,遇到如下问题:
1 Spread Winforms V10 图表的右键菜单(Select Data..)不弹配置数据源对话框, 点击(Select Data..)后再选单元格,抛异常,但其他的菜单项工作是正常的:


blob917701415.png

System.Exception was unhandled
  HResult=-2146233088
  Message=Exception handled in FpSpread.WndProc
  Source=FarPoint.Win.Spread
  StackTrace:
       at FarPoint.Win.Spread.FpSpread.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
       at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
       at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
       at System.Windows.Application.RunDispatcher(Object ignore)
       at System.Windows.Application.RunInternal(Window window)
       at System.Windows.Application.Run(Window window)
       at System.Windows.Application.Run()
       at WpfApplicationWithSpreadWinformsV10.App.Main() in e:\wn\Program\wpf\TT\WpfApplication1\WpfApplicationWithSpreadWinformsV10\obj\Debug\App.g.cs:line 0
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: System.NullReferenceException
       HResult=-2147467261
       Message=Object reference not set to an instance of an object.
       Source=FarPoint.Win.Spread
       StackTrace:
            at FarPoint.Win.Spread.Chart.ChartSelectDataSource.UpdateSelectionCellRange(SheetView sheetView, CellRange[] allSelectedCellRanges)
            at FarPoint.Win.Spread.ModelessForm.OnSelectionChanging(CellRange cellRange, CellRange[] allSelectedCellRanges)
            at FarPoint.Win.Spread.ModelessForm.a(Object A_0, SelectionChangingEventArgs A_1)
            at FarPoint.Win.Spread.FpSpread.OnSelectionChanging(SelectionChangingEventArgs e)
            at FarPoint.Win.Spread.FpSpread.a(SpreadView A_0, CellRange A_1, Int32 A_2, Int32 A_3)
            at FarPoint.Win.Spread.SpreadView.ContinueCellSelecting(Int32 x, Int32 y)
            at FarPoint.Win.Spread.SpreadView.h(MouseEventArgs A_0)
            at FarPoint.Win.Spread.FpSpread.OnMouseMove(MouseEventArgs e)
            at System.Windows.Forms.Control.WmMouseMove(Message& m)
            at System.Windows.Forms.Control.WndProc(Message& m)
            at FarPoint.Win.Spread.FpSpread.WndProc(Message& m)
       InnerException:


2  Spread Winforms V10  打不开office2007/2013 版本的带图表的EXCEL,抛异常:


System.InvalidOperationException was unhandled
  HResult=-2146233079
  Message=<chartSpace xmlns='http://schemas.openxmlformats.org/drawingml/2006/chart'> was not expected.
  Source=Microsoft.GeneratedCode
  StackTrace:
       at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderCT_ChartSpace.Read240_chartSpace()
  InnerException:


测试工程:
请见附件。

WpfApplicationWithSpreadWinformsV10.zip

101.95 KB, 阅读权限: 100, 下载次数: 1

5 个回复

倒序浏览
dexteryao讲师达人认证 悬赏达人认证 SpreadJS 开发认证
超级版主   /  发表于:2017-8-11 17:05:05
沙发
您好,问题收到,这边测试后给您答复
回复 使用道具 举报
wn_www
注册会员   /  发表于:2017-8-15 09:23:53
板凳
您好!不知我提的问题您调查到哪一步了?
回复 使用道具 举报
dexteryao讲师达人认证 悬赏达人认证 SpreadJS 开发认证
超级版主   /  发表于:2017-8-15 09:32:03
地板
本帖最后由 dexteryao 于 2017-8-15 09:38 编辑

您好,您这种使用方式并不是产品设计的使用方式,能否这样使用还需要时间调研,


回复 使用道具 举报
wn_www
注册会员   /  发表于:2017-8-21 09:49:23
5#
请问 对于问题 (2  Spread Winforms V10  打不开office2007/2013 版本的带图表的EXCEL,抛异常:)的调查有结果吗?
回复 使用道具 举报
Clark.Pan讲师达人认证 悬赏达人认证 SpreadJS 开发认证
超级版主   /  发表于:2017-8-21 18:09:43
6#
wn_www 发表于 2017-8-21 09:49
请问 对于问题 (2  Spread Winforms V10  打不开office2007/2013 版本的带图表的EXCEL,抛异常:)的调查 ...

您好,您这种使用方式和产品的设计使用方式存在出入,所以需要时间进行调研,我帮您在跟进一下,看看目前的进度如何。
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部