Gareth Horton
July 12th, 2002, 01:01 PM
Brian Hammer wrote:
> Hi group!
>
> I'm currently trying to use the OLE automation to open Monarch, open a Report, open a Model, and Export the Table to an Access database (.mdb) file. For some reason the whole process works perfectly if I export it to an Excel (.xls) file. However, when I try to export it to the Access file it doesn't work properly. It says "Loading Records for Table", and then Monarch closes and the routine ends. No error messages, no file exported, nothing. I look at the log file and it says Monarch started, opened Report, opened Model, then ended. Doesn't mention anything about the export operation. Eventually I would like to be able to append the data onto an already existing table within an Access file, but now I can't get it to even create a new Access file. It behaves the same way if I put an existing Access file in for the filename. It doesn't create a new table either.
>
> Is what I'm trying to do possible? If not I'm pretty sure I could automate it to export to Excel, then automate Access to import the data from Excel and append it to the existing table. I just figured it would be possible to automate this process since I was able to manually append the Monarch data onto my existing table inside the database.
>
> Once again, any help that you can provide would be greatly appreciated. I really do love the functionality of this program, and I'm enjoying getting to know what it can do better and better each day.
>
> Thanks!
> Brian
Just an FYI about importing an Excel file into Access. It is an extremely slow process. For some odd reason, Microsoft can not import their own product as fast as competing products. From Monarch, export as dBase or Paradox or even a flat file and it will import into Access much faster.
Sounds like a similar problem I had with all versions of 4.0.
What version of Monarch are you using? Version 5.0 should help.
We're at 5.02A ( the A version came directly from Tech Support).
Also, appending to a file is not *currently* supported through automation (only to text files).
You will need to send the table to a temporary .mdb file and the do the appending through Access.
Hope this helps!!
P.S. I've made my Monarch routine a Class Module for both Excel and Access if you would like to see it.
> Hi group!
>
> I'm currently trying to use the OLE automation to open Monarch, open a Report, open a Model, and Export the Table to an Access database (.mdb) file. For some reason the whole process works perfectly if I export it to an Excel (.xls) file. However, when I try to export it to the Access file it doesn't work properly. It says "Loading Records for Table", and then Monarch closes and the routine ends. No error messages, no file exported, nothing. I look at the log file and it says Monarch started, opened Report, opened Model, then ended. Doesn't mention anything about the export operation. Eventually I would like to be able to append the data onto an already existing table within an Access file, but now I can't get it to even create a new Access file. It behaves the same way if I put an existing Access file in for the filename. It doesn't create a new table either.
>
> Is what I'm trying to do possible? If not I'm pretty sure I could automate it to export to Excel, then automate Access to import the data from Excel and append it to the existing table. I just figured it would be possible to automate this process since I was able to manually append the Monarch data onto my existing table inside the database.
>
> Once again, any help that you can provide would be greatly appreciated. I really do love the functionality of this program, and I'm enjoying getting to know what it can do better and better each day.
>
> Thanks!
> Brian
Just an FYI about importing an Excel file into Access. It is an extremely slow process. For some odd reason, Microsoft can not import their own product as fast as competing products. From Monarch, export as dBase or Paradox or even a flat file and it will import into Access much faster.
Sounds like a similar problem I had with all versions of 4.0.
What version of Monarch are you using? Version 5.0 should help.
We're at 5.02A ( the A version came directly from Tech Support).
Also, appending to a file is not *currently* supported through automation (only to text files).
You will need to send the table to a temporary .mdb file and the do the appending through Access.
Hope this helps!!
P.S. I've made my Monarch routine a Class Module for both Excel and Access if you would like to see it.