Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
manojkulkarni
Partner - Specialist II
Partner - Specialist II

Qlikview Excel Export

HI All,

How should we export chart data to excel from Web Access (Access point). Exported data needs to sent or stored at client machine not in Qlikview Server. I saw few macros in cummunity, all of them talks about physical path of file location in server.

How should we make macro to ask path or should store in client machine ?

Any suggestions are appreciated...

6 Replies
amit_saini
Master III
Master III

Hi Manoj,

With Button , try something like below:

Sub ExportExcel1

vFile = ActiveDocument.Variables("vInput1").GetContent.String

'XLDoc.SaveAs "c:\Qlikview\Claro"& vFile &".xls"

set obj = ActiveDocument.GetSheetObject("CH580")

obj.ExportEx "\\XX.XXX.XXXXX**** Client Path*****......\"& vFile &".xls",5

End sub

Thanks,

AS

amit_saini
Master III
Master III

Also :

sub sendToExcel

    set XLApp = CreateObject("Excel.Application")

    XLApp.Visible = true

    set XLDoc = XLApp.Workbooks.Open("******Client Path*********") 'set path to template file

    set XLSheet = XLDoc.Worksheets("A3")

    XLSheet.Activate

   

    set table = ActiveDocument.GetSheetObject( "CH642" )

    for RowIter = 1 to table.GetRowCount-1

    for ColIter =0 to table.GetColumnCount-1

        set cell = table.GetCell(RowIter,ColIter)

       

        Select Case ColIter

        Case 1

            cellAddress = "B9" 'Cell address to paste data in Excel

            pasteData cellAddress, cell.Text, Doc, XLSheet

       

       

        End Select

       

        if ColIter = 18 then

            msgbox(cell.Text)

           

        end if

       

        if ColIter = 18 then

            msgbox(cell.Text)

            cellAddress = "B9" 'Cell address to paste data in Excel

            'Alex not used any more    fieldName = "Problem Desc." 'Field name in Qlikview

            pasteData cellAddress, cell.Text, Doc, XLSheet

        end if

           

    next

    next

       

end sub

Thanks,

AS

manojkulkarni
Partner - Specialist II
Partner - Specialist II
Author

Thanks Amit, I will try both the solutions

amit_saini
Master III
Master III

Pleasure

manojkulkarni
Partner - Specialist II
Partner - Specialist II
Author

One thing , how should we get Client Path ?

Normally if you download anything from internet, it will directly save to the download path configured. How to get that path ?

amit_saini
Master III
Master III

Hi Manoj,

You should try  to find out a path (Folder or drive) , which is accessible to both of you with ur organization.

This macro will not work , if the path is restricted!

Thanks,

AS