如何利用Halcon写入xls

*打开文件句柄,创建.xls文件
open_file (’…/data1.xls’, ‘output’, FileHand)
open_file (’…/data1.xls’, ‘append’, FileHand)
*第一行第一列写入a,并换列
fwrite_string (FileHand, ‘a\t’)
*第一行第二列写入1,并换行
fwrite_string (FileHand, ‘1\n’)
*第二行第一列写入b,并换列
fwrite_string (FileHand, ‘b\t’)
*第二行第二列写入2,并换行
fwrite_string (FileHand, ‘2\n’)
fwrite_string (FileHand, ‘c\t’)
fwrite_string (FileHand, ‘3\n’)
*清除句柄
close_file (FileHand)
结果图:
结果图

猜你喜欢

转载自blog.csdn.net/qq_40859802/article/details/103420758