Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Export to Excel

Hi All,

I am exporting straight table data to excel.

Based on the dates entered in input box, data is displayed in straight table.

Is there any way to export the dates also?

21 Replies
Miguel_Angel_Baeyens

Use VBScript string functions to split the caption according to a fixed length, for example

     'Get the caption

     chartCaption1 = Left(tableToExport.GetCaption.Name.v, 10)

     chartCaption2 = Right(tableToExport.GetCaption.Name.v, 10)

     'Set the first cell with the caption

     curSheet.Range("A1") = chartCaption1

     curSheet.Range("B1") = chartCaption2

Now I set two chartCaption variables, the first of which with the first 10 characters starting from left, and the second the 10 starting from right. The I copy these values in the first cell (top left A1) and the second (top, left +1, B1).

Adapt this to your captions.

Hope that helps.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

Not applicable
Author

Hi Miguel..Thanks...

Not applicable
Author

Hi Miguel,

Please let me know how can I change the heading properties in the excel when I export through  macro.

I dont know vb script.I have tried something like

ChartProperties.BlockCaptionFont.Bold = true..But It didnt work for me..

Anonymous
Not applicable
Author

Hi Miguel,

I have the same issue as well is there any way we can make this work in AJAX mode. Becuase we have more number of user base so we have decided to use AJAX mode. Any help on this will be a great help for me.

Thanks,

Vinay Kumar

Anonymous
Not applicable
Author

Hi Miguel,

I have the same issue as well is there any way we can make this work in AJAX mode. Becuase we have more number of user base so we have decided to use AJAX mode. Any help on this will be a great help for me.

Anonymous
Not applicable
Author

Hi Miguel,

I have the same issue as well is there any way we can make this work in AJAX mode. Becuase we have more number of user base so we have decided to use AJAX mode. Any help on this will be a great help for me.

Anonymous
Not applicable
Author

Hi Miguel,

I have the same issue as well is there any way we can make this work in AJAX mode. Becuase we have more number of user base so we have decided to use AJAX mode. Any help on this will be a great help for me.

Not applicable
Author

Hi Miguel,

I  tried your macro and it works perfectly.

But, I want to do something more.

I want to paste a second chart after the first one.

So, I used this function to find the next empty cell and paste the chart.

Range("A" & Rows.Count).End(xlUp).Offset(1).Select

curSheet.Paste

But it throws error 'Object Required:Rows'

Not applicable
Author

Hi All,

I used this.

usedRows=curSheet.UsedRange.Rows.Count

This fetches the count of used rows.

I have put the entire code here:


http://community.qlik.com/message/319742#319742

Regards,

Anju

Anonymous
Not applicable
Author

Hi Miguel,

I used your above code and it works fine.

Now what I want to do is to export some charts to excel one below the other:

I tried following

dim a,text,tm

a=Array("CH02","CH04","CH06","CH07")


for i = 0 to 4

b=a(i)

i=i+1

But I am not able to add it accurately in the code.

Moreover I want the charts below the previous charts.

Where to add

Range("A" & Rows.Count).End(xlUp).Offset(1).Select

curSheet.Paste

Or


usedRows=curSheet.UsedRange.Rows.Count

Sorry all confused. I am trying at my end.

Thanks for helping out.