Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for Data Integration and Data Analytics gurus. Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Partner
Partner

How to export data in excel file from a classical report along with chart title.

How to export data in excel file from a classical report along with chart title.

4 Replies
Highlighted
Creator III
Creator III

Re: How to export data in excel file from a classical report along with chart title.

Hi,

You can try using macros

Refer this link for more information:

How to export to Excel include Title Caption?

Thanks,

Pooja

Highlighted
Contributor III
Contributor III

Re: How to export data in excel file from a classical report along with chart title.

You could create a text object and make it look similar to the title, but you cannot export the title without macros.


Sub ExcelExpwCaption

     'Set the path where the excel will be saved

     filePath = "E:\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("LB02")

     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

Highlighted
Partner
Partner

Re: How to export data in excel file from a classical report along with chart title.

Actually I want a generic solution for all classical reports used in my qlikview application not for a single or particular fixed classical report.

Highlighted
Contributor III
Contributor III

Re: How to export data in excel file from a classical report along with chart title.

will try and l.u.k