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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

export object to excel?

what macro should i use? i'm using this but it isn't working

sub Exporta_a_Excel

set obj = ActiveDocument.GetSheetObject("CH13")

set vArchivo = "N:\APP\MARGEN_ESTIMADO\QVW\Informe.xls"

    obj.ExportEx vArchivo,5

end sub

Labels (1)
4 Replies
robert_mika
MVP
MVP

Try here:

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

qlikviewwizard
Master II
Master II

Not applicable
Author

that macro didn't work for me

Not applicable
Author

Hi

i edited only the object part but it isn't working. Do you know why?

FUNCTION ExcelExport(CH13)

  set obj = ActiveDocument.GetSheetObject( CH13)

  w = obj.GetColumnCount

  if obj.GetRowCount>1001 then

  h=1000

  else h=obj.GetRowCount

  end if

  Set objExcel = CreateObject("Excel.Application")

  objExcel.Workbooks.Add

  objExcel.Worksheets(1).select()

  objExcel.Visible = True

  set CellMatrix = obj.GetCells2(0,0,w,h)

  column = 1

  for cc=0 to w-1

   objExcel.Cells(1,column).Value = CellMatrix(0)(cc).Text

   objExcel.Cells(1,column).EntireRow.Font.Bold = True

  column = column +1

  next

  c = 1

  r =2

  for RowIter=1 to h-1

  for ColIter=0 to w-1

   objExcel.Cells(r,c).Value = CellMatrix(RowIter)(ColIter).Text

  c = c +1

  next

  r = r+1

  c = 1

next

END FUNCTION

SUB CallExample

  ExcelExport( "CH01" )

END SUB