If your application is not on the internet you should be able to use the UNC format. So instead of D:\ you would use \\servername\.
Also the ServerSideExportEx function does have an append to file option that you define in the 5th parameter.
My application is on the internet - end users access the application through the IE plug-in.
I probably did not state my question clearly: The problem does not lie in de location where the file should be exported to (D:\ or \\servername) but in the fact that client does not have writing rights on our servers.
For exporting complete object this can be solved by using ServerSideExportEx. Is it also possible to let the end user write to the server, equivalent to the 'ordinary' CreateTextFile and Write as in the example below?
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objExportFile = objFSO.CreateTextFile("D:\data\export\test.csv",true,true)
'Get data and write to the file
objExportFile.Write "Submission Date: " & SubmissionDate & vbNewline
'write other stuff to the file
Hopefully somebody can answer your question in this forum, but I have to admit that when I have a question about VBScript and not the QlikView API, I usually have better luck looking in looking in google for a forum where my question is almost always already answered.
My point on the QlikView ServerSideExportEx is that you're correct in saying that that funtion is for exporting complete objects, but don't limit the definition of a complete object. You can make a easily make a listbox with the value of avariable or fixed text and append it to an existing file using the ServerSideExportEx function.
I tried googling VB script sites, but no luck so far - of course it is pretty specific to QV, isn't it?
You're right that the ServerSideExport can be used to append different object into one, but my macro needs to loop through a straight table, and select lines to be exported. I cannot just filter out the unwanted lines, because the in- or exclusion depends on the values of fields of the previous line in the table (using the above function to determine those values).
Again: any help is appreciated.
Thanks Daniel, I was able to replicate what I wanted in the text file using the append boolean on ServerSideExportEx, my problem now is I take these files I have exported to the server, performed some processing on them and generated a new file I want to give back to the client, any idea how this is possible?
my basic plan is as follows
Client clicks a button which triggers a macro
The macro generates some files on the server and waits
Server side these files are processed and a new file generated
Then comes my problem, how do I allow the macro to see the new server side file and give it to the client?
any help is much apreciated, thanks
No, I never solved the problem.
This is the workaround that I use now:
The object is Exported to CSV ServerSide by a user induced macro.
On the server, a script runs every 5 minutes to see if new exports have arrived.
This script picks up the csv and processes it (i.e. line by line assesment if the line should be in the export).
The processed export is then procesed further.
My problem was that I couldn't get a user induced macro to write a file serverside line by line from an object.
The line-by-line treatment is now done by a script on the server and not in QV.
Not so nice, but it works.
As for your specific problem:
Either run a script on the server that send the exported file to an sftp location for you client to pick it up, or build a QV application that reads the exported file and let your client download it from the QV app