Solved

Run Excel 2010 macro template on my PHP website

Posted on 2013-10-22
7
410 Views
Last Modified: 2013-10-23
Hi all.

I have a website where my end users log on and enter some data: Builder/Community, and slab count. The data is stored on the MySQL web server. We have an Excel template with macro where the end user enters data parameters: Month/Year1 and Month/Year2 and they click a button that then pulls the data from the MySQL web server and does some calculations and then my Excel VBA script then creates some charts based on that data. This Excel file is on our network.

Now, my question is if it is possible to be able to run this same Excel template directly on my webpage. Have the end user enter the date parameters and then click a RUN button and the webpage will pump out the Excel file with the data and charts.

We want to do this because sometimes we are away from the office and we need to run this report. The way we do it now, is we call someone at the office to run it for us and email it so we can view it on our iPads. It would be great if we could do this directly on our iPads while on the website.

Is there any way to do this?

Thank you in advance!
0
Comment
Question by:Sim1980
  • 3
  • 2
  • 2
7 Comments
 
LVL 11

Expert Comment

by:jkpieterse
ID: 39593403
VBA will not work on Web Excel. Period. But you can use Javascript to manipulate embedded Excel files. I show an example on my website:
http://www.jkp-ads.com/articles/embeddedexcel00.asp
0
 
LVL 26

Assisted Solution

by:EddieShipman
EddieShipman earned 250 total points
ID: 39593759
Take a look at the PHPExcel library. I believe it has macro capability.
0
 

Author Comment

by:Sim1980
ID: 39593953
Thank you both for your suggestions. Could I use something like Apache OpenOffice or Google Charts on the website instead?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 11

Accepted Solution

by:
jkpieterse earned 250 total points
ID: 39594098
OF course you can, but it'll have it's own implications on how complex it is to build.
0
 

Author Comment

by:Sim1980
ID: 39594151
Ok. The problem I see is that my current Excel workbook connects to the MySQL database through the MySQL 5.1 ODBC driver that is installed on our workstations, I don't see how I can make it work other than using the PHPExcel library or Google Charts etc.
0
 
LVL 26

Expert Comment

by:EddieShipman
ID: 39594842
To be honest, it would probably be simpler to rewrite the macro to do it's manipulations in PHP, since you are using PHP to output the results, anyway. You probably could have been done with it by the time you research how to do it any other way.
0
 

Author Closing Comment

by:Sim1980
ID: 39594860
Thank you. I'm going to post another question about other possible solutions not working with Excel because of our iPad usage. Some Excel charts do not show correctly on iPads.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Excel Automation VBA 19 33
Excel Hyperlink Question 4 30
excel help 4 0
Testing a string condition in PHP 6 0
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now