Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
thnkgreen
Contributor

Button to expand all fields of a table and export to Excel

Hello everyone.  Is there a way to create a button that expands all fields in a table and then exports that table to Excel automagically?  Would someone please walk me through this process?  I really appreciate it.  Thank you.

1 Solution

Accepted Solutions
mwoolf
Honored Contributor II

Re: Button to expand all fields of a table and export to Excel

When you say "expands all fields in a table", I assume it is a pivottable.

From the API Guide:

     set chart = ActiveDocument.Activesheet.CreatePivotTable

     set gp = chart.GetProperties

     gp.TableProperties.PivotAlwaysFullyExpanded = true

     chart.SetProperties gp

You could write a macro that would set the PivotAlwaysFullyExpanded property to true.

Then export to Excel.

Then set the PivotAlwaysFullyExpanded property to false.

2 Replies
mwoolf
Honored Contributor II

Re: Button to expand all fields of a table and export to Excel

When you say "expands all fields in a table", I assume it is a pivottable.

From the API Guide:

     set chart = ActiveDocument.Activesheet.CreatePivotTable

     set gp = chart.GetProperties

     gp.TableProperties.PivotAlwaysFullyExpanded = true

     chart.SetProperties gp

You could write a macro that would set the PivotAlwaysFullyExpanded property to true.

Then export to Excel.

Then set the PivotAlwaysFullyExpanded property to false.

thnkgreen
Contributor

Re: Button to expand all fields of a table and export to Excel

Thank you Michael.  I was going to implement your suggestion but during a meeting yesterday was told that macros in QlikView are very unstable over the internet.  As I was wanting to publish my app to QV Server, I'm not sure that it would be worth the time to put a macro into my app only for it to be faulty because of the net.

Community Browser