duanmo5724 2013-06-16 23:32
浏览 26
已采纳

php excel阅读多个标签

I am using this code http://code.google.com/p/php-excel-reader for reading excel files with PHP.

It works great, but problem is when I open multiple tabs file with this code, it makes the page very large.

When I open a single tab file its work fine.

I need the tabs to look like excel as shows.

enter image description here

check above image. I need tabs like screenshot left image and right image, I open same file but don't have tabs actually that same file but the left original excel image show with tabs and right php script that i am sing not showing tabs..

I need any script which reads excel file the same as excel does and show all same as excel shows current script work fine but its not work with multiple tabs file the extention i am using is .xls

  • 写回答

1条回答 默认 最新

  • doucang6914 2013-06-18 00:13
    关注
    require_once 'Classes/PHPExcel.php';
    $objPHPExcel = PHPExcel_IOFactory::load("myExcelFile.xls");
    $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'HTML');
    $objWriter->writeAllSheets();
    $objWriter->save('php://output');
    

    You can play with the styling if you want the sheet list as tabs, and add a bit of js to hide/unhide the individual sheets by modifying PHPExcel/Writer/HTML.php

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 DIFY API Endpoint 问题。
  • ¥20 sub地址DHCP问题
  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突