Need hxl.ch"

46 views
Skip to first unread message

Vikram Chhajer

unread,
Jan 15, 2023, 1:46:22 AM1/15/23
to Harbour Users


Hello Experts 
Found This prg On net While Googling  to convert text fil to excel  , need  hxl.ch"   to run this prg can  any one help with this .ch 


#include "hxl.ch"

FUNCTION Main()

   LOCAL cText := "Text to be converted to Excel"
   LOCAL oExcel := HxlOpen()
   LOCAL oSheet := HxlAddSheet(oExcel, "Sheet1")
   LOCAL aText := Split(cText, CHR(13) + CHR(10))
   LOCAL nRow, nCol
   FOR nRow := 1 TO Len(aText)
       FOR nCol := 1 TO Len(aText[nRow])
          HxlWrite(oSheet, nRow, nCol, aText[nRow][nCol])
       NEXT
   NEXT
   HxlSave(oExcel, "Output.xls")
   HxlClose(oExcel)

RETURN Nil


Thanks 
Vikram

Reply all
Reply to author
Forward
0 new messages