Avatar of Lennart Ericson
Lennart EricsonFlag for Sweden

asked on 

How to export values in a database to an Excel sheet with php

I would like to ask you experts:
What is the best way to populate an Excel worksheet from a database with php?
I have an Excel worksheet containing headers and want to fill in values from the database in cells.
The database is on a web server.
PHPMicrosoft ExcelDatabases

Avatar of undefined
Last Comment
Lennart Ericson
Avatar of Excel amusant
Excel amusant

Not sure if I understand your question but if you are looking to import data from a table in web server here is the link which guide step by step.

http://www.howtogeek.com/howto/24285/use-online-data-in-excel-2010-spreadsheets/ 

Best,
Avatar of Lennart Ericson

ASKER

Thanks for the answer. I'll try to explain what I want to achieve.
The database contains more than 40 columns. Out of these I'd like to use 15. I have defined the columns I'd use and disregard the remaining columns.
I attach a Example_sheet.xlsxxlsx file as an example
So, I'd like to take data from the database and fill them in into the excel worksheet och predetermined places.
In the past I used an xml file that I populated with data from the database. What I am after is more of modern approach.
Hope this explains better what I am after.
Avatar of Excel amusant
Excel amusant

Hi,

First import data from web table into excel sheet and then we can build a macro to automatically remove the unwanted columns.

Please send a sample file with all 40 columns and highlight unwanted columns. I will create a macro for that.

Best,
ASKER CERTIFIED SOLUTION
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of Lennart Ericson

ASKER

Thanks Ray! Just what I meant.
Microsoft Excel
Microsoft Excel

Microsoft Excel topics include formulas, formatting, VBA macros and user-defined functions, and everything else related to the spreadsheet user interface, including error messages.

144K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo