How to export data to multiple excel worksheets using php – PHP

  php

Q(Question):

How to export data to multiple excel worksheets using php can anyone help on this please

A(Answer):

The underlying code in Excel spreadsheets is XHTML or XSL or something like that. Anyway, simple HTML tables can be written as strings to Excel

A(Answer):

Is your script for sending it to one excel worksheet working?

A(Answer):

Yeah exactly sending them into one excel sheet but data should get stored in number of worksheets…

A(Answer):

@shilpag

Can you post the code that you are trying to use for multiple sheets? It could be a number of things, and it’s easier to have a look at the code instead of guessing what you have typed.

A(Answer):

I have normal Excel Exporting code but i didnt tried with any code for this.
I can put my query like this,i have 3 different tables and want each table records to get exported to 3 different worksheets of one excel file.

A(Answer):

I am guessing that you cannot specify which sheet it goes to as you are exporting to .CSV format? I think what you want is for PHP to link to Excel so that when you press a button on a page it will update a certain excel document? If so, then PHP is unable to do that because it’s server side.

VB.NET might be able to help you, or something more involved like Java.

If this is not the case and you simply want to do fancier file creation, I recommend looking at a library like: http://phpexcel.codeplex.com/

LEAVE A COMMENT