Solved

Run Excel 2010 macro template on my PHP website

Posted on 2013-10-22
7
422 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
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 
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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo‚Ķ
This article discusses four methods for overlaying images in a container on a web page
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

832 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