Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
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!