Qlikview export pivot table using VBS

Source: Internet
Author: User

Many times users will have such a need, is qlikview design a good pivot table, if directly with the Qlikview Send to Excel function, then the export has no pivot table effect, such as

Then I use a macro to export this pivot table, after the export format and Qlikview consistent, the code is as follows:

Sub Export

Set xlapp = CreateObject ("Excel.Application") ' Define Object

Xlapp.visible = True ' Visible set as True

Set xldoc = XLApp.Workbooks.Add ' Open New workbook

Set table = Activedocument.getsheetobject ("CH03") ' CH03 is the object ID

Set xlsheet = xldoc.worksheets (1) ' Select sheet where data should be pasted

Table. Copytabletoclipboard true ' Copy data to Clipboard

Xlsheet.paste Xlsheet.range ("A1") ' Paste data into cell '

End Sub

In this code, my Pivot Table object is "CH03" so that I can finish exporting the pivot table.

Qlikview export pivot table using VBS

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.