How to run a XL / Word macros on server using PHP

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Arjuntcs
    New Member
    • Dec 2012
    • 4

    How to run a XL / Word macros on server using PHP

    I have an Application,whi ch for the current discussion , say takes a browse button in which user uploads an XL doc / Word Doc. The file gets uploaded on server. I want to parse the XL file for its contents . Similarly I want to parse the DOC file for its contents and do some manipulations e.g. retrieve the comments in the doc file , do some index based calculations on XL. I already have these as macros.

    I want the user to simply upload the file to the server, while all the work is done at the server and the results are displayed back on the webpage.

    In short, I want to know, Once I have a word/XL doc uploaded on my server, Can i use PHP to trigger macros in it? the Macros are themselves capable of generating the output I want.
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    If you instantiate an Excel or Word application, you can use the Run method to call a macro.

    Comment

    • Arjuntcs
      New Member
      • Dec 2012
      • 4

      #3
      @Rabbit,

      Thanks , Can you post an example?

      Comment

      • Rabbit
        Recognized Expert MVP
        • Jan 2007
        • 12517

        #4
        Code:
        excelApp.Run("macroName")

        Comment

        • Dormilich
          Recognized Expert Expert
          • Aug 2008
          • 8694

          #5
          Note that this will only work on a windows server, which is not just the majority of webserver OS.

          Comment

          Working...