0

Good day,

How do i create an msexcel file using php script? I have already prepared my data in a well structured array. I need to be able to format my array into tables in msexcel.

the server where the WAMP server is running has no MS Office installed, would it affect my objective to create the msexcel file. do i need to install on msoffice in the server in case? fyi, i dont actually need to save the excel file in the server but can be an option too.

thanks.

hakre
  • 193,403
  • 52
  • 435
  • 836
JCm
  • 1,919
  • 8
  • 27
  • 42

2 Answers2

0

This is really a spin on DaveRandoms comment.

Make a CSV and set the mimetype to any of the ones in this SO question.

That way Excel (or any equivalent application) will start and show the file.

Community
  • 1
  • 1
idstam
  • 2,848
  • 1
  • 21
  • 30
0

The PHPExcel library will let you take your data and write it into a valid Excel file, whether you need old-style XLS or new style XLSX format.

You don't need to have Excel installed on the server to use it.