Range的排序方法不可用

编程入门 行业动态 更新时间:2024-10-06 01:45:45
本文介绍了Range的排序方法不可用-生成异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

你好, 谁可以给我打电话这段代码有什么问题? 我遇到一个异常:"System.Runtime.InteropServices.SEHException" 非常感谢您

Hello, Who can tel me what it is wrong in this code ? I got an exception : ''System.Runtime.InteropServices.SEHException'' Thank you very much

Excel::RangePtr ptrK1 = ptrSheet->Cells->GetItem(1,3); _variant_t K1 = _variant_t (ptrK1); Excel::RangePtr ptrK2 = ptrSheet->Cells->GetItem(1,4); _variant_t K2 = _variant_t (ptrK2); Excel::RangePtr ptrK3 = ptrSheet->Cells->GetItem(1,2); _variant_t K3 = _variant_t (ptrK3); Excel::XlSortOrder order = Excel::xlAscending; Excel::XlSortType typ = Excel::xlSortLabels; Excel::XlYesNoGuess head = Excel::xlYes; Excel::XlSortOrientation orien = Excel::xlSortRows; Excel::XlSortMethod meth = Excel::xlPinYin; Excel::XlSortDataOption opt1 = Excel::xlSortNormal; Excel::XlSortDataOption opt2 = Excel::xlSortNormal; Excel::XlSortDataOption opt3 = Excel::xlSortNormal; const _variant_t varM = vtMissing; //&Key1, Order1, &Key2, &Type, Order2, &Key3, Order3, Header, &OrderCustom, &MatchCase, Orientation, SortMethod, DataOption1, DataOption2, DataOption3 ptrRng->Sort (&K1, order, &K2, &varM, order, &K3, order, head, &varM, &varM, orien, meth, opt1, opt2, opt3);

已添加代码标签-LOSMAC [/EDIT]

Code tags added - LOSMAC[/EDIT]

推荐答案

Hello 它是排序指令本身. 例外是excel.tli文件中的5812行. 在自动机"视图调试中,对于&Key1,存在错误:无法获取值";其他所有参数_variant_t相同. 并且显示的文本是: 类型为"System.Runtime.InteropServices.SEHException"的例外 信息供应商:弱者根本没有征税. 谢谢 Hello It is the sort instruction itself. The exception is at the line 5812 in the excel.tli file. In the "automatique" view debug, for the &Key1 there is "error:cannot obtain value"; it is the same for all others parameters _variant_t. and the displayed text is : Une exception non gérée du type ''System.Runtime.InteropServices.SEHException'' s''est produite dans traitementfichiersoab.exe Informations supplémentaires : Un composant externe a levé une exception. thank you

更多推荐

Range的排序方法不可用

本文发布于:2023-11-12 21:05:58,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1582532.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:不可用   方法   Range

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!