完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
您好,我使用的是7.5版,并尝试使用excel菜单中的CreateXYChart用户对象来创建图表。
我得到一个VEE运行时错误“错误与折线图设置名称数组。可能原因是数组不像数据数组那么大。同时验证您是否选择了对数,没有负数据值”我没有选择对数。 要选择图表的数据,我使用xlLib.DataFromCells函数从Excel电子表格中提取数据。 我对该函数的输入是A23:F423形式的文本。我尝试的任何输入列范围都得到相同的错误,除非我使用A23:B423。 在这种情况下,没有出现错误,但是当我看到情节时,没有任何东西可见。 当我检查它的源数据时,似乎只使用一个点:x数据为A423,y数据为B423,而不是绘制所有401个数据点。关于问题在这里或我能做什么的任何想法 要解决这个问题。 我已经查看了创建xyChart的示例程序,我没有看到该示例与我正在尝试做的事情之间存在很多差异。谢谢您的帮助! 以上来自于谷歌翻译 以下为原文 Hello, I am using version 7.5 and trying to use the CreateXYChart user object from the excel menu to create a chart. I am getting a VEE Run Time Error "Error with line chart settings Names array. Probably cause is array not as large as data array. Also verify if you selected logarithmic, there are no negative data values" I haven't selected logarithmic. To select the data for the chart, I am using the xlLib.DataFromCells function to pull data from an excel spreadsheet. My input to that function is text of the form A23:F423. I get that same error for any range of input columns I try except when I use A23:B423. In that case, no error shows up, but when I look at the plot nothing is visible. When I check its source data, it seems to be using only a single point: A423 for the x data and B423 for the y data instead of plotting all 401 data points. Any ideas as to what the problem is here or what I can do to fix it. I've looked at the example program for creating an xyChart and I don't see many differences between that example and what I'm trying to do. Thank you for your assistance! |
|
相关推荐
4个回答
|
|
我正在使用两台电脑。
一个有Office 2003,另一个有Office 2007.我给出的描述来自使用Office 2003的那个。另一个问题另一个问题(从图表对象本身得到错误)我认为可能是因为没有更新 图书馆? 当我尝试运行示例程序时,存在运行时错误“在引用的ActiveX对象中获取属性'选择'失败”错误号552。 以上来自于谷歌翻译 以下为原文 I'm using two computers. One has Office 2003 and one has Office 2007. The description I gave is from the one using Office 2003. Having another issue on the other one (getting an error from the chart object itself) which I think may be due to not having some updated library? When I try to run the example program, there is a runtime error "Get of property 'select' in the referenced ActiveX object failed" Error number 552. |
|
|
|
所以,我假设你想坚持2003 xls格式?如果是这样,那么在Excel下拉列表中坚持使用“CreateXYChart”。
我不使用这些库,但你的问题可能是它一次只能处理一个系列。 而你试图一次推出6个系列(A至F)。 虽然是正确的想法。如果没有,请将Excel下拉。 设备> .NET程序集参考> COM选项卡> Microsoft Excel XX.0对象库。然后,导入“Microsoft.Office.Interop.Excel”命名空间,以便您可以声明一些对象。 数据>变量>声明变量>类型:对象,子类型:COM>编辑:Excel应用程序。现在您已经掌握了Excel 2007.如果您不关心,我不会详细介绍,但我可以查看 以这种方式创建一些图表的示例。 以上来自于谷歌翻译 以下为原文 So, I assume you'd like to stick with the 2003 xls format? If so, then stick with the "CreateXYChart" in the Excel drop-down. I don't use those libraries, but your problem is probably that it can only handle one series at a time. Whereas you're trying to push 6 series at a time (A thru F). Right idea though. If not, screw the Excel drop down. Device > .NET Assembly Reference > COM tab > Microsoft Excel XX.0 Object Library. Then, Import the "Microsoft.Office.Interop.Excel" Namespace so you can declare some objects. Data > Variable > Declare Variable > Type: Object, Sub Type: COM > Edit: Excel Application. Now you have a handle on Excel 2007. I won't go into more detail if you don't care, but I can chop up an example to create some charts this way. |
|
|
|
是的,这正是因为值已作为文本输入。
我之前遇到过这个问题,我将格式化的时间戳记作为x-axis。代替问题持续存在,我会尝试将我的程序(已经工作了几个月)写成一个示例来绘制图表 工作表数组.PS:401点的数据? 也许是ESA频谱分析仪? 以上来自于谷歌翻译 以下为原文 Yes, it is exactly because the values have been entered as text. I've run into this problem before with having a formatted time-stamp as the x-axis. In lieu of the problem persisting, I'll try to whittle down my program (been working on for months) into an example for charting from a worksheet array. PS: 401 pts of data? ESA spectrum analyzer perhaps? |
|
|
|
好的,看看我是怎么做的。
仅适用于安装了Excel 2007的PC。 随意深入了解.NET程序集参考,以适应Excel 2003或更早版本。请注意,它肯定不是最简单的方法,但它最终会让您最大程度地控制Excel。 以上来自于谷歌翻译 以下为原文 Ok, see view for how I do it. Will only work on a PC that has Excel 2007 installed. Feel free to dig into the .NET Assembly References to adjust for Excel 2003 or older. Be warned, it's certainly not the easiest way, but it will ultimately give you the most control over Excel. |
|
|
|
只有小组成员才能发言,加入小组>>
1252 浏览 0 评论
2360 浏览 1 评论
2173 浏览 1 评论
2042 浏览 5 评论
2925 浏览 3 评论
999浏览 1评论
关于Keysight x1149 Boundary Scan Analyzer
725浏览 0评论
N5230C用“CALC:MARK:BWID?”获取Bwid,Cent,Q,Loss失败,请问大佬们怎么解决呀
828浏览 0评论
1252浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-3 22:13 , Processed in 1.171089 second(s), Total 52, Slave 45 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号