Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

VBA: How to show hidden sheets in a QV document

I am trying to access QV sheet and its objects from Excel Macro. There are few sheets which are hidden and I want to show/access their properties. Let me know if anyone has successfully done it.

4 Replies
Not applicable
Author

Friends, has anyone tried this or has a solution to this. I have been trying multiple things but no luck as of yet. Below is sample of few trial and error statements.

Dim QVApp As New QlikView.Application

Dim QVDoc As QlikView.Document

Dim QVSheet As SheetObject

Dim SP As Object

Dim strFilename As String

Dim i As Integer

strFilename = "D:\QVReport.qvw"

Set QVDoc = QVApp.OpenDocEx(strFilename, 1, False, "001")

Debug.Print QVDoc.Sheets(0).GetProperties.Show.Always

Set QVSheet = QVDoc.GetSheetObjectByInternalCtlNo(5)

Debug.Print QVSheet.GetSheet.GetProperties.Name

Debug.Print QVSheet.GetStatus

QVSheet.GetSheet.GetProperties.Show.Always = True

'QVSheet.GetSheet.GetProperties.Name

For i = 0 To QVDoc.NoOfSheets

    Debug.Print QVDoc.Sheets(i).GetProperties.Name

Next i

Regards,

Rajesh

Not applicable
Author

why you use the Macro ?

Are you using QV Excel ?

Not applicable
Author

Yes. VBA in Excel.

Regards,

Rajesh

Not applicable
Author

I am not familiar with QV Excel.

Create the New Tab Called "QV Excel" and Copy all the requires QV Charts into this sheet and Select Always on Layout tab. Use these objects into your QV Excel,