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

Append text to text file from access point

Hi Guys

My vendor has request:

Qlikview App users (Clients) when open an app from access point can Append text to a  shared text file on server

how can I do this for him

thanks

img1_server_client.png

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

I did it finally by mu self

I Use this Macro

'---------------------------------Start of Macro--------------

sub Append

Const ForAppending = 8

Set objFSO = CreateObject("Scripting.FileSystemObject")

'-----this is the address of shared file

Set objFile = objFSO.OpenTextFile("\\Server IP\...\textreport.txt", ForAppending)

'---I need to variable that i define them here

Set var1 = ActiveDocument.Variables("vInput")

var = var1.GetContent.String

Set var2 = ActiveDocument.Variables("vQVUser")

var3 = var2.GetContent.String

objFile.WriteLine

objFile.Write "" &var3& "," &var& ","&now

objFile.Close

end sub

View solution in original post

2 Replies
marcus_sommer

By using the IE plugin a macro similar to this one: VBS. openOutputFile issue could be used (the second parameter by OpenTextFile needs to be 8 for appending data). By using the AJAX client it won't be possible.

- Marcus

Anonymous
Not applicable
Author

I did it finally by mu self

I Use this Macro

'---------------------------------Start of Macro--------------

sub Append

Const ForAppending = 8

Set objFSO = CreateObject("Scripting.FileSystemObject")

'-----this is the address of shared file

Set objFile = objFSO.OpenTextFile("\\Server IP\...\textreport.txt", ForAppending)

'---I need to variable that i define them here

Set var1 = ActiveDocument.Variables("vInput")

var = var1.GetContent.String

Set var2 = ActiveDocument.Variables("vQVUser")

var3 = var2.GetContent.String

objFile.WriteLine

objFile.Write "" &var3& "," &var& ","&now

objFile.Close

end sub