How to Convert excel to HTML using php

Source: Internet
Author: User
Using php to convert excel to HTML to convert various documents (such as pdf and excel) into HTML can be understood as the online document preview requirement. At present, there is no problem in converting pdf to html, but Microsoft documents such as excel have not been ready yet. I want to find some open-source software that can be used. (It's hard to parse all of them.) I'm a beginner in php. I use php to convert excel to HTML.
To convert a variety of documents (pdf, excel, etc.) into HTML, you can understand the online document preview requirement.
At present, there is no problem in converting pdf to html, but Microsoft documents such as excel have not been ready yet. I want to find some open-source software that can be used. (All parsing is a little difficult)

I am very grateful to you for your understanding of php.

------ Solution --------------------
PHP can read the csv format in excel. after obtaining the data, you can perform html layout as required:
PHP code
$ Row = 1; $ handle = fopen ("test.csv", "r"); while ($ data = fgetcsv ($ handle, 1000 ,",")) {$ num = count ($ data); echo"

$ Num fields in line $ row:
\ N "; $ row ++; for ($ c = 0; $ c <$ num; $ c ++) {echo $ data [$ c]."
\ N ";}} fclose ($ handle );
------ Solution --------------------
Http://www.iteye.com/topic/333676
------ Solution --------------------
How do you do this? please share it with me.
------ Solution --------------------
PHPExcel to parse the data. You need to perform operations on your own to convert to html.
URL: http://phpexcel.codeplex.com/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.