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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Qlikview - add data to existing excel file

Hi,

I have next code which open new excel file and add data. I need to modife my code to export data to existing excel file.

  sub ExportChart

set cs = ActiveDocument.GetSheetObject("TX01")

set XLApp = CreateObject("Excel.Application")

XLApp.Visible = True

set XLDoc = XLApp.Workbooks.Add

XLDoc.Sheets(1).name = "Exported text object" set

XLSheet = XLDoc.Worksheets(1)

XLSheet.Range("A1") = cs.GetText()

End Sub

Any idea?

1 Reply
Aurelien_Martinez
Partner - Specialist II
Partner - Specialist II

Hi,

I am not a VBS expert but,

sub ExportChart

set cs = ActiveDocument.GetSheetObject("TX01")

set XLApp = CreateObject("Excel.Application")

XLApp.Visible = True

Set XLDoc = XLApp.Workbooks.Open("C:\test.xls")

XLDoc.Sheets(1).name = "Exported text object" set

XLSheet = XLDoc.Worksheets(1)

XLSheet.Range("A1") = cs.GetText()

End Sub

Aurélien

Help users find answers! Don't forget to mark a solution that worked for you!