Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
I've not done much vbscripting, so I'm looking for some code snippets for a macro which exports data from a sheet object to a .CSV file. There is the export option by right clicking on the object but we would like to be able to do this via a Button; and if possible let this process run in the background thus allowing the user to still use the tool while exporting very large data set. Any suggestions would be appreciated.
Okay, I've manage to create a button to export to .CSV, I had a the wrong Objectid in the getsheet object call. My second question, is it possible to run the download as separate process or background process using the vbscripting language? The files that we are exporting are quite large and time consuming. I'm thinking the data is locked so that no changes occurr to the data while the export is in progress so it may not be possible. Any thoughts on this will be appreciated.
Nadir
Nadir,
I don't have an answer to your questions but would appreciate seeing your code for exporting to a text file from a button.
Regards,
John.
John,
Here is the code I used to export to a .CSV file :
Sub SR37
'Download Sheet ojbect data to CSV
set sObject = ActiveDocument.GetSheetObject("CH24")
sObject.Export "C:\TEST.CSV",","
End Sub
I use a button object to trigger this subroutine.
Nadir
Nadir,
thanks for this.
John.