0 Replies Latest reply: Aug 16, 2010 11:39 AM by rlandeo _ RSS

    Export Missing Data

    rlandeo _

      I'm trying to script out a project to export into an Access database.  If I run the project manually, I can export the table view into a database.  If I try it through a batch script, the database contains only the headers and not the data.  The batch script is as follows:

       

      monarch /prj:"LATELEXT.xprj" /exp:"LATELEXT.mdb" /exptable:"TBL_LATELEXT"

       

      I tried exported to Excel, but I had the same issue.  Any help is appreciated.  Thanks in advance.

        • Export Missing Data
          Data Kruncher

          Hi Raul,

           

          When working with Access files and tables, you need two more command line parameters: /expfileopt (specifying either of add, overwrite or skip) and /exptableopt (similarly specifying either of overwrite, append or skip).

           

          Try adding those and see if it helps. We'll go from there if it's still not playing nicely.

           

          Kruncher

            • Export Missing Data
              Olly Bond

              Hello Raul,

               

              As well as Kruncher's points, I thought I should just make sure that you're using:

               

              "C:\Program Files\Monarch\Program\Monarch.exe"[/CODE]

               

              instead of plain "monarch" in the batch file.

               

              Best wishes,

               

              Olly

                • Export Missing Data
                  rlandeo _

                  I tried adding the 2 other parameters, but I get the same issue.  The file gets created, but only with headers, no data.  I created a project export, but that didn't work.  I don't know if there is a switch to run a project with its project exports.

                   

                  As for calling Monarch by just its name, I edited the PATH environmental variable in Windows and added the path to the program, so my scripting would be a little easier to read and write.

                    • Export Missing Data
                      Data Kruncher

                      To run the project exports as defined in your project file, use /px:name to run an individual defined export, or use /pxall to run all of the defined exports.

                       

                      Is a default filter applied to the Table (that results in no records being listed) when the model is opened?

                        • Export Missing Data
                          Data Kruncher

                          I'm at a bit of a loss.

                           

                          I've just built and run a little test using the exact syntax of your original post, with a project file using a test report file and model. It worked just fine, even without the mentioned /exptableopt and /expfileopt parameters.

                           

                          Are you appending to the table in the mdb file, or overwriting the table entirely?

                  • Export Missing Data
                    rlandeo _

                    I ran the batch file with the switch /pxall and it did export, but again with no data in the fields.  The file looks like this now:

                     

                    monarch /prj:"LATELEXT.xprj" /pxall

                     

                    There is no filter applied and I do see the records when I run just the project file.  I am attempting to overwrite the table entirely.

                     

                    The only thing I can think of is that I'm opening up a DB file and applying the model to it.  In my batch file, I have other projects running and exporting, but those data files are fixed-width text files, not a DB file.  What gets me is that running it manually, I do see the data.