Halcom 发表于 2016-12-24 21:44:26

读取txt数据(替代读取excel数据)

halcon读取txt数据还是很方便的,但是读取excel数据就显得棘手了。
建议将excel数据复制到 txt文本文件里面
open_file ('area.dat', 'input', FileHandle)
fread_string (FileHandle, Number, IsEOF)
Number := number(Number)
IsEOF := 0
while (IsEOF == 0)
fread_string (FileHandle, Index, IsEOF)
fread_string (FileHandle, Area, IsEOF)
endwhile
close_file (FileHandle)
halcon11.0读取excel,我还没调试过,我用的就是txt文本文件来读取数据的。



页: [1]
查看完整版本: 读取txt数据(替代读取excel数据)