Daoting / dt

利用 C# + XAML 进行快速业务开发的跨平台框架(搬运工)
https://github.com/daoting/dt
54 stars 12 forks source link

excel打印功能升级WinUI后报错 #96

Closed Daoting closed 1 year ago

Daoting commented 1 year ago
未处理异常:System.Runtime.InteropServices.COMException
System.Runtime.InteropServices.COMException (0x80040155): 没有注册接口 (0x80040155)
   at WinRT.ExceptionHelpers.<ThrowExceptionForHR>g__Throw|20_0(Int32 hr)
   at WinRT.ExceptionHelpers.ThrowExceptionForHR(Int32 hr)
   at ABI.Windows.Graphics.Printing.IPrintManagerStaticMethods.GetForCurrentView(IObjectReference _obj)
   at Windows.Graphics.Printing.PrintManager.GetForCurrentView()
   at Dt.Cells.UI.ExcelPrinter..ctor(Excel p_excel, PrintInfo p_printInfo, Int32 p_sheetIndex)
   at Dt.Base.Excel.Print(PrintInfo p_printInfo, Int32 p_sheetIndex, String p_title)
   at Dt.UIDemo.PrintExcel.OnPrintExcel(Object sender, RoutedEventArgs e)
   at WinRT._EventSource_global__Microsoft_UI_Xaml_RoutedEventHandler.EventState.<GetEventInvoke>b__1_0(Object sender, RoutedEventArgs e)
   at ABI.Microsoft.UI.Xaml.RoutedEventHandler.Do_Abi_Invoke(IntPtr thisPtr, IntPtr sender, IntPtr e)