Skip to main content
Announcements
Meet the 2024 Qlik Luminaries and Partner Ambassadors! READ ON!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Xml properties and server

If I use this function ActiveDocument.GetSheetObject( "CH01" ).WriteXmlPropertiesFile "C:\MychartProp.xml"

with a file that is published from server, the path to export is a path of server.

How can I export the xml properties file on client?

Thanks

2 Replies
raajeshn
Partner - Creator
Partner - Creator

Hi All,

I am also facing a similar problem. WriteXMLPropertiesFile Function doesnt seem to work for me. The below statement executes without any error, but does not provide any output files.

oQVObject.WriteXmlPropertiesFile "D:\TEST.xml"

oQVObject is a declared SheetObject. I am able to get values like Caption, Object Id, etc from this object. However, WriteXmlPropertiesFile doesnt seem to work.

Appreciate your help.

Thanks & Regards,

Raajesh N

raajeshn
Partner - Creator
Partner - Creator

Hi All,

Found a way to resolve this issue. Here is a copy of the script used by me.

Sub getQlikViewObjectXML(strFileName As String, strFolderPath As String)

    Dim oQVApp As QlikView.Application
    Dim oQVDoc As QlikView.Document
    Dim oQVSheet As QlikView.Sheet
    Dim oQVSheetObject As QlikView.SheetObject
   
    Dim lSheet As Long
    Dim lSheetObject As Long
    Dim strXMLFileName As String
   
    Set oQVApp = New QlikView.Application
           
    Set oQVDoc = oQVApp.OpenDocEx(strFileName, 1, False)
   
    For lSheet = 0 To oQVDoc.NoOfSheets - 1
        Set oQVSheet = oQVDoc.Sheets(lSheet)
        oQVDoc.ExportSheetLayoutFile ("C:\Temp\" & Mid(oQVSheet.GetProperties.SheetId, 10) & ".xml"), oQVSheet.GetProperties.SheetId
        For lSheetObject = 0 To oQVSheet.NoOfSheetObjects - 1
            oQVSheet.GetSheetObjects(lSheetObject).WriteXmlPropertiesFile (strFolderPath & Mid(oQVSheet.SheetObjects(lSheetObject).GetObjectId, 10) & ".xml")
        Next lSheetObject
    Next lSheet
       
    oQVDoc.CloseDoc

    oQVApp.Quit
   
    Set oQVSheetObject = Nothing
    Set oQVSheet = Nothing
    Set oQVDoc = Nothing
    Set oQVApp = Nothing
   
End Sub

This statment seems to work

oQVSheet.GetSheetObjects(lSheetObject).WriteXmlPropertiesFile (strFolderPath & Mid(oQVSheet.SheetObjects(lSheetObject).GetObjectId, 10) & ".xml")

However, if I declare a SheetObject (like the one below) and if I use WriteXMLPropertiesFile - then the desired output is not available.

    Set oQVSheetObject = oQVSheet.GetSheetObjects(1)

    oQVSheetObject.WriteXmlPropertiesFile ("C:\Temp\SheetObject.xml")

Experts can correct me, if am wrong.

Regards,

Raajesh N