Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How to write relative path in Qlikview Macro? I need it because i want to overwrite an Excel file in the Qlikview Server.
Thanks
Hi,
Are you using ServerSideExportEx instead of ExportEx? That should work when referring to the drives in the Server locally. Anyway, using UNC paths are likely to work.
Hope that helps.
BI Consultant
I show my code :
Sub SaveToExcel
set v = ActiveDocument.Variables("vSubject")
varSubject = v.GetContent.String
set v = ActiveDocument.Variables("vBody")
varBody = v.GetContent.String
NewFileName = "\DataEmail.xlsx"
set XLApp = CreateObject("Excel.Application")
XLApp.Visible = false
set XLDoc = XLApp.Workbooks.Add
XLDoc.Sheets(1).Range("A1") = "Subject"
XLDoc.Sheets(1).Range("A2") = varSubject
XLDoc.Sheets(1).Range("B1") = "Body"
XLDoc.Sheets(1).Range("B2") = varBody
XLDoc.SaveAs NewFileName
XLApp.Quit
MsgBox("Save is successfull")
end sub
Can you show me the right code how to save with relative path in server if i want to save from another computer using browser?
because NewFileName = "\DataEmail.xlsx" is not the right path
Thanks
Hi,
Did you try "\\SERVER\SharedResource\File.xlsx" ? And just the file name (no folders nor drives)? I was not talking about these objects, rather than the QlikView API ones to export a chart to a file.
Regards.
BI Consultant