Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
Showing results for 
Search instead for 
Did you mean: 
Creator III
Creator III


HI All

Iam exporting a straight table to excel and in excel i want to colur yellow column D and Column F

how do i mention the code in the macro for this ?

My Code :

sub ExportToExcel_Ration

Dim CLApp, XLDoc,XLSheet

  set XLApp = CreateObject("Excel.Application") ' Define Object

  XLApp.Visible = True 'Visible set as true

  set XLDoc = XLApp.Workbooks.Add 'Open new workbook

  set XLSheet = XLDoc.Worksheets.Add

  ActiveDocument.GetSheetObject("CH04").CopyTableToClipboard TRUE



End Sub

Thanks in Advance

3 Replies

That's a vbscript question, not a qlikview question. Try this article: An example of using a VBS script to create, populate and format an Excel document | Geeks Hangout:

'Change the background colour of column A to a light yellow

objExcel.Columns(1).Interior.ColorIndex = 36

talk is cheap, supply exceeds demand
Creator III
Creator III

Hi Gysbert

I tired it it now working

Iam using the same macro what i posted above and to that in the last row i added ur code but its not running


Of course it won't run if you blindly copied that line. Your code doesn't create an object with the name objExcel.

talk is cheap, supply exceeds demand