A
avtar.jain
Guest
hi ithrees, it is quite easy if you have MS EXCEL installed on server or on machine which is running 4GL code. Just create a template XLS file with everyting you want like LOGO, colours, heading, footer now replace VALUES with mergemarks like change Total=100$ with Total=%AMT% making sure mergemark name does not conflict with each other create a tiny 4GL to read this template, make a copy and reply mergemarks with datavalues code snippet - CREATE "Excel.Application" chExcelApp. ASSIGN chWorkbook1 = chExcelApp:Workbooks:OPEN(MyXLSTemplate). ASSIGN chWorkSheet1 = chExcelApp:Sheets:ITEM(1). ASSIGN chWorkbook = chExcelApp:Workbooks:ADD. ASSIGN chWorkSheet = chWorkbook:Sheets:ITEM(1). chWorkSheet1:COPY (chWorkSheet). chWorkbook1:CLOSE(NO). ASSIGN chWorkSheet = chWorkbook:Sheets:ITEM(1). ... ... chWorksheet:Range(cRange):VALUE = lcDBValue.
Continue reading...
Continue reading...