Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
qv_testing
Specialist II
Specialist II

Need Help????

Hi Community,

I have straight table.

Here  i want to show 3 columns, but when i am export to excel i need two more columns.

see like this...

Required field's to show..          

Name    Dept      Sal

XYZ      IT          10000

ZYV     NON-IT   8000

Export to Excel

Name     Organization       Dept      Sal           plotform

XYZ           ABC                  IT        10000       Qlikview

ZYV        Accenture        NON-IT   8000         .Net

Thanks in Advance.......................

1 Solution

Accepted Solutions
morgankejerhag
Partner - Creator III
Partner - Creator III

See my example. You need a macro to solve it. You can see the macro if you press ctrl+M

View solution in original post

10 Replies
maleksafa
Specialist
Specialist

this needs to be done in macro, not normal export from QV

agomes1971
Specialist II
Specialist II

Hi,

please see this thread

Qlikview to excel export macro

Hope it helps.

Thanks

André Gomes

ali_hijazi
Partner - Master II
Partner - Master II

create a variable (Settings->Variable Overview) name it vShow

give it an initial value of 0

now go to your straight table with the five columns set

now go to properties of your chart

put in the Enable Conditional for the dimension that you want to hide vShow =1

test.png

and for the expression that you want to hide put in the check the conditional check box and put vShow=1

test.png

Now that the initial value of the vShow = 0 the designated dimensions and expressions will be hidden

Now add a button and on the actions add an action to run a macro this macro will export your chart to excel as follows:

ActiveDocument.GetVariable("vShow").SetContent 0,true

set XLApp = CreateObject("Excel.Application")

' Makes it run in background

XLApp.Visible = false

XLApp.DisplayAlerts = false

Set fso = CreateObject("Scripting.FileSystemObject")

If (fso.FileExists(put_the_path of the excel file here)) Then

  Set XLDoc = XLApp.Workbooks.Open (path to excel file)

Else

  set XLDoc = XLApp.Workbooks.Add()

  ' Save the excel-file with the dynamic path and filename

  XLDoc.SaveAs path_to_excel

End If

  ActiveDocument.GetSheetObject("id of your chart").CopyTableToClipboard true

  XLDoc.Sheets(1).Paste()

  XLDoc.Sheets(1).Rows("1:3000").EntireRow.AutoFit

' Save the excel-file with the dynamic path and filename

XLDoc.SaveAs QcRegressionExcelFilePath

' Exits the current running Excel

XLApp.Quit

ActiveDocument.GetVariable("vShow").SetContent 1,true

I can walk on water when it freezes
jagan
Luminary Alumni
Luminary Alumni

Hi,

With single table it is not possible, create two charts with Name, Dept, Sal in one chart and another with additional columns, create a button and assign a macro this.

Hide the chart with details and use this chart in macro to export to excel.

Regards,

jagan.

ashfaq_haseeb
Champion III
Champion III

HI,

May be like this

Regards

ASHFAQ

ali_hijazi
Partner - Master II
Partner - Master II

you can hide some columns in any table!!

I can walk on water when it freezes
qv_testing
Specialist II
Specialist II
Author

anyone have sample application.....

ashfaq_haseeb
Champion III
Champion III

Did you check my application?

Regards

ASHFAQ

morgankejerhag
Partner - Creator III
Partner - Creator III

See my example. You need a macro to solve it. You can see the macro if you press ctrl+M