I don’t have experience with parts 2 and 3 of your question, but this should get you started with part 1.
This is a VB script I use occasionally.
Set MonarchObj = CreateObject("Monarch32")
openfile = MonarchObj.SetLogFile("c:monarch eportsVBS.LOG",False)
openfile = MonarchObj.SetProjectFile("c:monarchPublishContractEmployees.prj")
If openfile Then
Set Monarchobj = Nothing[/font][/quote]
ok, I've been able to get this to work just as I needed. Is there a way to specify the version of excel this exports to? When I am testing with an import to Access, the version is not recognized. /b[/quote]How did you get this to work please?
To answer your first question, there are two ways to use command lines. The first way is to use DOS batch files. There have been some examples posted on this forum. The second way is to use VB code, which can be run through Excel.
Take a look at an example [url="http://mails.datawatch.com/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=1;t=000517"]here[/url].
Within Excel, select Tools > Macro > Visual Basic Editor. Bob's code would need to be in a named sub, such as Sub ExportReports(), followed by an End Sub. Once you've added a subroutine to a code module, the name of that macro is available to Excel under Tools > Macro > Macros.
To answer your third question, yes, it's possible to loop through any number of reports and export the data. The choices of ways to do that depend on your version. Are you using version 6 of Monarch or Monarch Pro?
[size="1"][ May 18, 2006, 05:14 PM: Message edited by: Todd Niemi ][/size]
A third option is Visual Basic Scripting, which Bob pointed out.
Cut/Paste the code Bob provided into notepad. Change the report name and path to your report and the model name and path to your model. Save the file with a .VBS extension. You can now double-click on that file and it will run monarch and export your report.