Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Team,
I have a request from User, that while "Send to Excel" any Qlikview charts the downloaded excel file must have some predefined names.(e.g. Monthly Sales Volume)
I tried by changing the Object ID of each Object (e.g. CH01 to Monthly Volume), by doing so I am able to achieve the desired result in by Qlikview Developer, but not on Server.(i.e. not able to achieve the same while opening the same published application on access point on opening on Chrome).
Guys, Need your urgent help in this content.
Thanks.
Regards,
AK.
You can use a macro, maybe actioned by a button.
Sub ExcelExpwCaption
'Set the path where the excel will be saved
'filePath = "C:\TestBB.xls"
'Create the Excel spreadsheet
Set excelFile = CreateObject("Excel.Application")
excelFile.Visible = true
'Create the WorkBook
Set WorkBook = excelFile.WorkBooks.Add
'Create the Sheet
Set Sheet = WorkBook.WorkSheets(1)
'Get the chart we want to export
Set tableToExport = ActiveDocument.GetSheetObject("CH23")
Set chartProperties = tableToExport.GetProperties
tableToExport.CopyTableToClipboard true
'Get the caption
chartCaption = tableToExport.GetCaption.Name.v
'MsgBox chartCaption
'Set the first cell with the caption
Sheet.Range("A1") = chartCaption
'Paste the rest of the chart
Sheet.Paste Sheet.Range("A2")
excelFile.Visible = true
'Save the file and quit excel
'WorkBook.SaveAs filePath
'WorkBook.Close
'excelFile.Quit
'Cleanup
Set WorkBook = nothing
Set excelFile = nothing
End Sub