donotey 发表于 2006-8-15 21:31:11

可以将字符串写入excel中吗?

LV8.0是否可以将字符串写入excel中?用Write to text File.vi节点可以将字符串写入一个已经存在的text文档中,不覆盖原文件,直接添加在原文件的后面,相当于修改,可以吗?

szb 发表于 2006-8-16 05:28:37

<p>需要写入Excel时,用Array To Spreadsheet String节点把要输入的内容转换格式后,写入write to spreadsheet file.vi节点即可</p>

szb 发表于 2006-8-17 21:54:08

<p>补充昨晚的回复,另外,write to spreadsheet file.vi节点可多态选择,包括双精度,整型,字符,连接端点format:%s或使用多态选择为string即可.</p>

donotey 发表于 2006-8-16 19:38:46

<p>可是write to spreadsheet file.vi节点写入的只能是数据。也就是说我最终打开excel文档时发现里面的字符均不能显示,显示为零。</p><p>另外:用write to text file.vi可以将字符写入excel文档,就是输入保存文件名时加上后缀.xls。但是write to text file.vi节点不支持续写,也就是说不能写在原有文档的后面。</p><p>是这样吗?</p>

cpubbs 发表于 2006-8-16 20:29:28

TAB是分列的意思!兄弟可以试试!可以用WRITE TXT FILE那个节点!

donotey 发表于 2006-8-15 21:44:02

<p>我本想用write to spreadsheet file.vi节点将字符串写入excel中,发现这个节点只能将一维或二维数组写入excel,字符串好像不行。</p>

ricken 发表于 2006-8-18 01:30:44

楼上的办法可以试试,一直都以为write to spreadsheet file.vi节点只能是数值.

szb 发表于 2006-8-17 05:30:39

<p>上次回复错了,应是</p><p>需要将字符型数组写入Excel时,用Array To Spreadsheet String节点把要输入的内容转换格式后,写入write to&nbsp;text file.vi节点即可.</p><p>写入前用Open/Create/Replace File 节点,设置为open or create </p><p>&nbsp;</p>

donotey 发表于 2006-8-17 17:05:49

<p>呵呵,谢谢热心的版主!</p>
页: [1]
查看完整版本: 可以将字符串写入excel中吗?