Skip to main content

Mass export to excel - data selection based on keys

Hi there,
I am dealing with a mass export of data from idea databases to e.g. excel files now, but unfortunatelly I am not getting on well with that. :-(
I will try to describe the situation:
I prepared a database containing accounting data (booking entries) in IDEA. Then I did a selection based on key values (Data - Selections - Selection based on key values...). The key value is an G/L Account. IDEA created several individual databases (imd files) - for each key value (G/L Account) one database. Now I want to export all the individual databases to excel. There is no option to do that on mass. In case of big amount of key values (e.g. 100), it is annoying to do the export 1 by 1.
I tried to do a test script: I did the export for one value (G/L account 1) first, then I copied the script from "History" and extend the script for the second value (G/L account 2). When I triggerred the script, it went to error ("Error on line xx - Duplicate definition: myArray).
Is there any chance to do the mass export from IDEA?
Thank you for any idea. :-)
Dan

Brian Element Wed, 09/06/2017 - 09:33

Hi Baricha,

Here is a function that will return a true or a false if the file exists.


'Function assumes that the file will be in the working folder.  If in sub folder then
'the function must be changed to add the sub-folder or the sub-folder needs to 
'be added to the Filename
Function CheckFileExists(ByVal Filename As String) As Boolean
	Dim fso As Object
	
	Set fso = CreateObject("Scripting.FileSystemObject")
	If fso.FileExists(Client.WorkingDirectory & Filename) Then
		CheckFileExists = True
	Else
		CheckFileExists = False
	End If

End Function