The below code will export your DataTable to Environment(''SystemTempDir'') which is usually C:Temp unless you've changed it, then it will upload it to an existing resource located in ALM Resources. When calling the function, you have to use the exact name of the Resource. See the screenshot.
SaveToQC(''Export_DT_2_ALM'')
Function SaveToQC(ResourceName)
'' Connection To QC
Set qcc = QCUtil.QCConnection
'' Setting Temp Folder
TempFolder = environment(''SystemTempDir'')
Set ResourceFactory = qcc.QCResourceFactory
Set ResourceList = ResourceFactory.NewList('''')
Set Resource = Nothing
iTotalItems = ResourceList.Count
For ItemCtr = 1 To iTotalItems
CurItem = ResourceList.Item(ItemCtr).Name
If UCase(CurItem) = UCase(ResourceName) Then
Set Resource = ResourceList.Item(ItemCtr)
End If
Next
Set ResourceFactory = Nothing
Set ResourceList = Nothing
'' Export Datatable to Temp Directory
Datatable.Export TempFolder & '''' & Resource.Filename
Resource.Post
Resource.UploadResource TempFolder, True
End Function
Screenshot: [ALM Resources][1]
[1]: http://screencast.com/t/kjeRzxWqH