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

Is it possible to export straight table(contain info images as column) to excel as a data set(2016)?

Is it possible to export straight table(contain info images as column) to excel as a data set(2016)? I have searched for many posts and also Google? Marco or any other methods are welcome! Thanks

Capture.JPG

6 Replies
bindu_apte
Creator III
Creator III

Hi,

I dont think you can export to excel which is having images.

avinashelite

I think you need to make use of macro for this ...check this thread will help you

Export Straight Table to Excel - Images issue

Anil_Babu_Samineni

Hi

This macro will do this, and will not append the objects title.

Just call the function with the full file and path to the excel file and the Object ID.

  1. Sub Test 
  2.    ExcelAppend "h:\test.xlsx", "CH01" 
  3. End Sub 
  4. Sub ExcelAppend(strExcelAppenFile, strExelAppendObjectID) 
  5.    ' Create an instance of Excel 
  6.    SET objExcelApp = CREATEOBJECT("Excel.Application"
  7.     
  8.    ' Open workbook 
  9.    WITH objExcelApp 
  10.       .DefaultSaveFormat = xlWorkbookNormal 
  11.       .DisplayAlerts = FALSE 
  12.       .Workbooks.Open strExcelAppenFile 
  13.       .DisplayFullScreen = FALSE 
  14.       .Visible = FALSE 
  15.    END WITH 
  16.     
  17.    ' Set worksheet 
  18.    SET objExcelSheet = objExcelApp.Worksheets(1) 
  19.        
  20.    ' Set Excel used range 
  21.    SET objExcelRange = objExcelSheet.Range("A65535").End(-4162) 
  22.    ' Last used row in column
  23.    intExcelLastRow = objExcelRange.Row 
  24.    ' Set object to append from 
  25.    SET objObjectFrom = ActiveDocument.GetSheetObject(strExelAppendObjectID) 
  26.    ' Loop all rows of the object except first header row 
  27.    FOR intObjectRow = 1 To objObjectFrom.GetRowCount - 1 
  28.       ' Loop all columns of the object 
  29.       FOR intObjectColumn = 0 To objObjectFrom.GetColumnCount - 1 
  30.          ' Get object data 
  31.          SET objCell = objObjectFrom.GetCell(intObjectRow, intObjectColumn) 
  32.          ' Add that data to Excel cell 
  33.          objExcelSheet.Cells(intObjectRow + intExcelLastRow, intObjectColumn + 1) = objCell.Text 
  34.       NEXT 
  35.    NEXT 
  36.     
  37.    ' Save and quit 
  38.    objExcelSheet.SaveAs strExcelAppenFile 
  39.    objExcelApp.Application.Quit 
  40.    SET objExcelSheet = NOTHING       
  41.    SET objExcelApp = NOTHING 
  42. END SUB
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
Not applicable
Author

Thanks sir, I have tried on this but it only turned a single object into img or data(Not the one I want).

Not applicable
Author

Thanks sir, but the last column(Image) are missing after it is exported! ;(

Not applicable
Author

Sir, for more, it is not an URL, the images are loaded using BUNDLE INFO LOAD and displayed by info()