Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
kiranpatil123
Contributor III
Contributor III

On Click of button , send to Excel

Hey guys  ,

Please Help on this Task

-On a click of a Button / Text box , data from straight Table should be directly send to excel . I have rough idea on macro but not able to implement on it ,

Info - ( I don't need  any special icon  from caption to be added  )

1 Solution

Accepted Solutions
kiranpatil123
Contributor III
Contributor III
Author

Thank you all of you , finally it worked . from all your suggestions it helped a lot . Thank you

Link -   Qlikview Export to Excel Part 1 - BuffaloBI.com

Sub BasicExportToExcel

DIM ExcelApplication, ExcelWorkbook

SET ExcelApplication = CREATEOBJECT("Excel.Application")
SET ExcelWorkbook = ExcelApplication.Workbooks.Add

ActiveDocument.GetSheetObject("CH618").CopyTableToClipBoard TRUE

ExcelWorkbook.Worksheets(1).Paste
ExcelApplication.DisplayAlerts = FALSE
ExcelWorkbook.SaveAs "..\Desktop\KPI_Parameters.xls" , 56
ExcelApplication.Quit

MsgBox "Export Complete & Saved in Desktop"

End Sub

View solution in original post

8 Replies
Anil_Babu_Samineni

Here you go,

SUB EXPORT

set sObject1 = ActiveDocument.GetSheetObject("CH01")

sObject1.Export "C:\Users\Kingof\Qlikview\MyDoc.xls"

end sub

https://community.qlik.com/docs/DOC-4870

https://luciancotea.wordpress.com/2013/07/18/qlikview-macros-useful-collection/

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
PrashantSangle

Hi,

There is no direct way to achieve it.

You have to use macro.

Please find below thread for your reference.

Using macro to send to excel

Regards,

Prashant

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
avinashelite

kiranpatil123
Contributor III
Contributor III
Author

thanks  , for the source

I have pasted the code in the button ( macro) and changed  the object code and file path , FURTHER iam Stuck ( what should be done in the straight table)

avinashelite

You need to do anything in the straight table ..In your macro include the Straight table ChartID

kiranpatil123
Contributor III
Contributor III
Author

Thank you all of you , finally it worked . from all your suggestions it helped a lot . Thank you

Link -   Qlikview Export to Excel Part 1 - BuffaloBI.com

Sub BasicExportToExcel

DIM ExcelApplication, ExcelWorkbook

SET ExcelApplication = CREATEOBJECT("Excel.Application")
SET ExcelWorkbook = ExcelApplication.Workbooks.Add

ActiveDocument.GetSheetObject("CH618").CopyTableToClipBoard TRUE

ExcelWorkbook.Worksheets(1).Paste
ExcelApplication.DisplayAlerts = FALSE
ExcelWorkbook.SaveAs "..\Desktop\KPI_Parameters.xls" , 56
ExcelApplication.Quit

MsgBox "Export Complete & Saved in Desktop"

End Sub

kiranpatil123
Contributor III
Contributor III
Author

Thanks Avinash for the Help

Not applicable

Hello!

Could you tell me, please, what might be a reason for this macro not to work on server?

("Allow macro " in QMC is switched on)