4 Replies Latest reply: May 15, 2014 9:52 AM by RalphB _ RSS

    Exel formating with visual basic script

    yesb _

      Hi,

       

      I 'm using monarch v7. I m getting a problem when using visual basic script to create exports.

      The exported excel files are well formatted(options-export and clipboard options-Applyformating to export files)if I run from monarch or from command line but the export was not formatted if I run it from visual basic script.

      Any suggetions?

      Thanks

        • Exel formating with visual basic script
          Gareth Horton

          Yesb,

           

          You need to use the JetExportTable / JetExportSummary methods to get the Excel formatting - I suspect you are using ExportTable / ExportSummary

           

          Gareth

           

          Originally posted by yesb:

          Hi,

           

          I 'm using monarch v7. I m getting a problem when using visual basic script to create exports.

          The exported excel files are well formatted(options-export and clipboard options-Applyformating to export files)if I run from monarch or from command line but the export was not formatted if I run it from visual basic script.

          Any suggetions?

          Thanks /b[/quote]

          • Exel formating with visual basic script
            RalphB _

            I am experiencing the same thing with one of my exports.  I am using the JetExportSummary / JetExportTable command in VB with success on dozens of other VB scripts successfully every day except for this one.

             

            Here is a copy of the command line that I am using to export:

             

            [font="courier"] expfile = MonarchObj.JetExportSummary("g:accountingsuspense report" _

            & myfilename & " age.xls", "Age Suspense", 0) /font[/quote]The model is set to export with XL formatting. 

            Any thoughts as to why I have problems with only this one?

            • Exel formating with visual basic script
              Gareth Horton

              Ralph

               

              Try to avoid using spaces in sheet names, as Monarch uses Named Ranges to export and format and unfortunately, they do not support spaces in names, even though worksheets do.

               

              Gareth

               

              Originally posted by RalphB:

              I am experiencing the same thing with one of my exports.  I am using the JetExportSummary / JetExportTable command in VB with success on dozens of other VB scripts successfully every day except for this one.

               

              Here is a copy of the command line that I am using to export:

               

              [font="courier"] expfile = MonarchObj.JetExportSummary("g:accountingsuspense report" _

              & myfilename & " age.xls", "Age Suspense", 0) /font[/quote]The model is set to export with XL formatting. 

              Any thoughts as to why I have problems with only this one? /b[/quote]

              • Exel formating with visual basic script
                RalphB _

                Thanks Gareth,

                 

                  redface.gif[/img]   Sometimes it takes a fresh set of eyes to see the problem.