完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
嗨,我有几个关于Excel与VEE的使用的问题.1)我使用Visible = TRUE将数据发送到Excel中的单元格,以便在采集数据时监视值。
但是,当我单击之前打开的另一个Excel选项卡时,单元格数据会被应该进入VEE正在使用的工作簿的值覆盖。 我怎么能阻止这个? 我希望查看/更改工作簿,同时VEE将数据发送到单独的工作簿而不会覆盖数据,并且仍然可以选择单击VEE用于查看VEE正在发送的值的Excel选项卡.2)I 我使用DATATOCELL Excel用户对象来指定VEE发送数据的单元格。 但是,我受限于行和列的CELLS输入语法(即A1)。 有没有一种方法可以专门选择行号和列号而不是列为字母。 我创建了一个将数字映射到一个字母的算法然后我将其连接到行号以输入到DATATOCELL。 这有更简单的方法吗? 当我需要大量列映射时,我当前的方法很乏味且不太有用。谢谢你的帮助。 任何建议表示赞赏。 以上来自于谷歌翻译 以下为原文 Hi, I have a couple of questions regarding the use of Excel with VEE. 1) I am sending data to cells in Excel with Visible=TRUE to monitor the values as the data is being taken. However, when I click on another Excel tab that was previously opened, cell data gets overwritten with values that should be going in to the workbook VEE is using. How can I stop this? I would like to view/make changes to a workbook while VEE sends data to separate workbook without having the data overwritten and still have the option of clicking on the Excel tab VEE is using to once look at the values VEE is sending. 2) I am using the DATATOCELL Excel user object to designate what cell VEE sends the data to. However, I am limited by CELLS input syntax (i.e. A1) for row and column. Is there a way of specifically choosing a row and column number instead of the column being a letter. I have created an algorithm that maps a number to a letter then I concatenate that to the row number to input into DATATOCELL. Is there a simpler way for this? My current method is tedious and not very useful when I need a large number of columns to map to. Thanks for the help. Any advice is appreciated. |
|
相关推荐
4个回答
|
|
|
|
|
|
使用Excel库在VEE中初始化Excel后,创建一个公式对象,其中包含以下内容:xlApp.ignoreremoterequests = TRUE; 这将为VEE创建Excel的独占实例。 因此,您可以继续使用Excel进行其他工作,这根本不会影响VEE。 因此,来自VEE的数据将始终存在于VEE计划应该去的地方。 在程序结束时,使用以下命令创建另一个公式对象:xlApp.ignoreremoterequests = FALSE; 问候,Uday 以上来自于谷歌翻译 以下为原文 Once you initialize Excel in VEE using Excel library, create a formula object with the following in it: xlApp.ignoreremoterequests = TRUE ; This will create an exclusive instance of Excel for VEE. So, you can continue to use Excel for other work and that will not disturb VEE at all. So, the data from VEE will always go where the VEE program says it should go. At the end of the program, create another formula object with: xlApp.ignoreremoterequests = FALSE ; Regards, Uday |
|
|
|
Pikachu_ding 发表于 2019-4-1 16:10 我尝试了Uday的推荐,如果Excel工作表可见= FALSE,效果很好。 如果visible = TRUE,则活动工作表仍会被覆盖。 但是,如果visible = FALSE,它将使任何现有的打开工作簿在VEE启动Excel库时不可见。 也许ActiveX是要走的路? 以上来自于谷歌翻译 以下为原文 I tried Uday's recommendation and it works well if the Excel sheet visible=FALSE. If visible=TRUE, the active sheet still gets written over. However, if the visible=FALSE, it will make any existing open workbook invisible together when the VEE starts the Excel library. Perhaps ActiveX is the way to go? |
|
|
|
60user15 发表于 2019-4-1 16:15 我认为VISIBLE = TRUE与否是不重要的。 我几天前在VRF邮件列表上发布了一个VEE程序来展示旗帜。 我再次检查了VISIBLE = TRUE,我没有看到活动工作簿被覆盖。 根据您声明标志的时间和地点,您可能会遇到问题。 我声明如程序中所示,并且工作正常。 通常,从VEE写入Excel时,我会隐藏Excel实例; 我认为该文件没有理由可见,因为它仅适用于VEE而不适用于运营商。 操作员始终可以从硬盘打开文件并查看内容而不会打扰VEE(因为标志)。 这就是我检查这个程序的方法:1。Excel VISIBLE = TRUE。 2.我打开任何Excel工作簿进行编辑; 比如,Book1.xls。 3.运行附加的VEE程序(将Excel文件temp.xls放在程序中指定的路径中或将路径修改为您喜欢的路径)。 4.单击“确定”按钮(忽略按钮名称,或者您可以执行按钮要求您执行的操作)。 5.当程序完成时,Book1.xls不会受到干扰,temp.xls不会受到干扰,并且您有一个由程序创建的新temp_new.xls。 请注意,temp.xls的值为10.1到11.0,而temp_new.xls在相同的单元格中有12到21。 问候,Uday VEE_Excel_rmt_request.vee36.4 KB 以上来自于谷歌翻译 以下为原文 I don't think it matters whether VISIBLE = TRUE or not. I posted a VEE program to VRF mailing list a few days ago for demonstrating the flag. I checked again with that with VISIBLE = TRUE and I do not see the active workbook being overwritten. You may have problems depending on when and where you declare the flag. I declare as shown in the program and that works fine. Normally, when writing to Excel from VEE, I keep that instance of Excel hidden; I see no reason for that file being visible since it is only for VEE and not for the operator. The operator can always open the file from hard disk and look at the contents without disturbing VEE (because of the flag). This is how I checked this program: 1. Excel VISIBLE = TRUE. 2. I open any Excel workbook for my editing; say, Book1.xls. 3. Run the attached VEE program (place the Excel file temp.xls in the path specified in the program or MODIFY that path to whichever you prefer). 4. Click through the OK buttons (ignore the button names or you may do what the buttons ask you to do). 5. When the program completes, Book1.xls is NOT disturbed, temp.xls is not disturbed and you have a new temp_new.xls created by the program. Note that temp.xls has 10.1 to 11.0 as the values whereas temp_new.xls has 12 to 21 in the same cells. regards, Uday 附件
|
|
|
|
只有小组成员才能发言,加入小组>>
1221 浏览 0 评论
2346 浏览 1 评论
2155 浏览 1 评论
2021 浏览 5 评论
2900 浏览 3 评论
964浏览 1评论
关于Keysight x1149 Boundary Scan Analyzer
700浏览 0评论
N5230C用“CALC:MARK:BWID?”获取Bwid,Cent,Q,Loss失败,请问大佬们怎么解决呀
801浏览 0评论
1223浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-22 14:35 , Processed in 1.460273 second(s), Total 85, Slave 68 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号