Solved

Run Excel 2010 macro template on my PHP website

Posted on 2013-10-22
7
396 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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

These days socially coordinated efforts have turned into a critical requirement for enterprises.
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

708 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

16 Experts available now in Live!

Get 1:1 Help Now