如何利用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)
結果圖:
結果圖

發佈了6 篇原創文章 · 獲贊 3 · 訪問量 591
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章