Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Chart title (caption) export to XL not working with expression

Hello guys,

I've found this part of macro on this forum to export title caption to excel :

....................

set chart=ActiveDocument.GetSheetObject("CHxxx")
set p = chart.GetProperties
ExcelDoc.Sheets(1).cells(1,1).Value = p.GraphLayout.WindowTitle.v

.................

It works fine for charts caption but only if it is a text title like "Investment "

Once I try to include a calculated title, I encouter an "unexpected error" from the macro.

NB : my expression is working very well as caption title:

='Investment :' & date(v2date1) & ' to ' & date(v2date2)

Where is my problem ?

Somebody to give me an idea to correct this portion of VBscript ?

Thanks for your help in advance.

2 Replies
IAMDV
Master II
Master II

Please can you post the QV document with sample data? This will be very helpful to understand the issue...

Not applicable
Author

Hi DV,

here is a simple example with two buttons.

The second macro stop when it tries to paste the caption into XL with the expression.

Thanks in advance