[计划]阅读大件的PHP文件
像我这个职位的最即使这样不仅来自意图做一些'的信息,提醒我是如何解决一个问题,我想到:其实我的记忆通常是我的错误的和天文数字要找到相同的信息超过一次,我不喜欢很^ _ ^
一个活动的时候,我们需要做的是在飞行过程中“一个xls文件”(也许结果dell'upload提供给用户)和管理数据在它(可能的结构如我们所预料的是,否则例如不切实际..),数据库中的表或流行的只是我们的网站上查看他们。
那么,这一问题的解决是很容易,你的想法。
它运行在Sourceforge上 的项目 ,它使阶级ExcelReader通过我们需要的一切可用。
拥有包括两个文件reader.php在我们的脚本和oleread.inc,我们将准备做的工作“肮脏”。
首先,我们初始化的类,然后passiamogli要打开的文件:
$数据“改为('nome_filel.xls'); 接下来需要做的,当然,是使每个行和列指出循环:
$数据“表[0] ['0]; $数据“表[0] ['numCols'];
代表行和列数大件文件(特别是在文件的第一页)。
在这一点上,我们可以在每个单元访问它包含的值,因为我们的不平凡矩阵:
$数据“表[0] ['细胞'] [$一] [$ ĵ]; 一个示例脚本来显示,从大件的视频数据文件以表格形式如下:
“? require_once'Excel中/ reader.php'; $数据=新Spreadsheet_Excel_Reader(); $数据“setOutputEncoding('CP1251'); $数据“改为('nome_file.xls'); 使用error_reporting(E_ALL来^一个E_NOTICE); 回声“<表”; 为($ = 1,$一“= $数据”表[0] ['numRows'],$一+ +)( 回声“<tr>”; 为($ ĵ = 1,$ ĵ“= $数据”表[0] ['numCols'],$ ĵ + +)( 回声“<td>。$数据”表[0] ['细胞'] [$一] [$ ĵ ]."</运输署“”; ) 回声“,”/训练班“”; ) 回声“,”/表“”; ?“
西蒙兹:当然,你也可以在表循环,撰写文件..大件
人气:8%[?]
标签:Excel中, 常见问题帮助和教程, 开放源码,PHP 中,SourceForge.net
leave a response , or trackback from your own site. 您可以按照任何 , 这个项目通过 2.0 饲料入口的反应。您可以 留下 您自己的网站 一回应, 或 引用 。



![Reblog此帖[与Zemanta]](http://img.zemanta.com/reblog_e.png?x-id=1a581053-a80a-4f72-acd1-fdf59ecf4c5a)
![添加'[计划] xls文件阅读与PHP'到Del.icio.us Aggiungi '[Programmazione] Leggere file xls con PHP' a Del.icio.us](http://www.vitruviantux.net/wp-content/plugins/social-bookmarking-reloaded/delicious.png)
![添加'[程序]阅读与PHP大件'的digg文件 Aggiungi '[Programmazione] Leggere file xls con PHP' a digg](http://www.vitruviantux.net/wp-content/plugins/social-bookmarking-reloaded/digg.png)
![添加'[程序]阅读与PHP大件'到FURL文件 Aggiungi '[Programmazione] Leggere file xls con PHP' a FURL](http://www.vitruviantux.net/wp-content/plugins/social-bookmarking-reloaded/furl.png)
![添加'[程序]阅读与PHP大件'的书签在文件 Aggiungi '[Programmazione] Leggere file xls con PHP' a blinklist](http://www.vitruviantux.net/wp-content/plugins/social-bookmarking-reloaded/blinklist.png)
![添加'[程序]阅读与PHP大件'的reddit文件 Aggiungi '[Programmazione] Leggere file xls con PHP' a reddit](http://www.vitruviantux.net/wp-content/plugins/social-bookmarking-reloaded/reddit.png)
![添加'[程序]阅读与PHP大件'哺养我链接文件 Aggiungi '[Programmazione] Leggere file xls con PHP' a Feed Me Links](http://www.vitruviantux.net/wp-content/plugins/social-bookmarking-reloaded/feedmelinks.png)
![添加'[编程]阅读xls文件与PHP'到Technorati Aggiungi '[Programmazione] Leggere file xls con PHP' a Technorati](http://www.vitruviantux.net/wp-content/plugins/social-bookmarking-reloaded/technorati.png)
![添加'[程序]阅读与PHP大件'我的雅虎网页文件 Aggiungi '[Programmazione] Leggere file xls con PHP' a Yahoo My Web](http://www.vitruviantux.net/wp-content/plugins/social-bookmarking-reloaded/yahoo_myweb.png)
![添加'[计划] xls文件阅读与PHP'到Socializer Aggiungi '[Programmazione] Leggere file xls con PHP' a Socializer](http://www.vitruviantux.net/wp-content/plugins/social-bookmarking-reloaded/socializer.png)
![添加'[计划] xls文件阅读与PHP'到Ma.gnolia Aggiungi '[Programmazione] Leggere file xls con PHP' a Ma.gnolia](http://www.vitruviantux.net/wp-content/plugins/social-bookmarking-reloaded/magnolia.png)
![添加'[计划] xls文件阅读与PHP'到谷歌书签 Aggiungi '[Programmazione] Leggere file xls con PHP' a Google Bookmarks](http://www.vitruviantux.net/wp-content/plugins/social-bookmarking-reloaded/google.png)
![添加'[计划] xls文件阅读与PHP'到Bloglines Aggiungi '[Programmazione] Leggere file xls con PHP' a Bloglines](http://www.vitruviantux.net/wp-content/plugins/social-bookmarking-reloaded/bloglines.png)
![添加'[计划] xls文件阅读与PHP'到Squidoo Aggiungi '[Programmazione] Leggere file xls con PHP' a OKnotizie](http://www.vitruviantux.net/wp-content/plugins/social-bookmarking-reloaded/oknotizie.gif)
![添加'[程序]阅读与PHP大件'的Bookmark.it文件 Aggiungi '[Programmazione] Leggere file xls con PHP' a Bookmark.it](http://www.vitruviantux.net/wp-content/plugins/social-bookmarking-reloaded/bookmark.png)
![添加'[程序]阅读与PHP大件'启齿文件 Aggiungi '[Programmazione] Leggere file xls con PHP' a Ask](http://www.vitruviantux.net/wp-content/plugins/social-bookmarking-reloaded/ask.png)
![添加'[程序]阅读与PHP大件'的意乱情迷文件 Aggiungi '[Programmazione] Leggere file xls con PHP' a Delirious](http://www.vitruviantux.net/wp-content/plugins/social-bookmarking-reloaded/delirious.png)
![添加'[程序]阅读与PHP大件'到Live - MSN的文件 Aggiungi '[Programmazione] Leggere file xls con PHP' a Live-MSN](http://www.vitruviantux.net/wp-content/plugins/social-bookmarking-reloaded/live.png)
![添加'[程序]阅读与PHP大件'的SlashDot文件 Aggiungi '[Programmazione] Leggere file xls con PHP' a SlashDot](http://www.vitruviantux.net/wp-content/plugins/social-bookmarking-reloaded/slashdot.png)
![添加'[编程]阅读xls文件与PHP'的Diggita Aggiungi '[Programmazione] Leggere file xls con PHP' a Diggita](http://www.vitruviantux.net/wp-content/plugins/social-bookmarking-reloaded/diggita.png)
![添加'[计划] xls文件阅读与PHP'到Facebook Aggiungi '[Programmazione] Leggere file xls con PHP' a FaceBook](http://www.vitruviantux.net/wp-content/plugins/social-bookmarking-reloaded/facebook.png)
![添加'[编程]阅读xls文件与PHP'的文章评分 Aggiungi '[Programmazione] Leggere file xls con PHP' a Wikio](http://www.vitruviantux.net/wp-content/plugins/social-bookmarking-reloaded/wikio.png)
![添加'[编程]阅读与PHP大件'到MySpace档案 Aggiungi '[Programmazione] Leggere file xls con PHP' a MySpace](http://www.vitruviantux.net/wp-content/plugins/social-bookmarking-reloaded/myspace.png)
![添加'[计划] xls文件阅读与PHP'到Twitter Aggiungi '[Programmazione] Leggere file xls con PHP' a Twitter](http://www.vitruviantux.net/wp-content/plugins/social-bookmarking-reloaded/twitter.png)
![添加'[编程]阅读与PHP大件'到Tailrank文件 Aggiungi '[Programmazione] Leggere file xls con PHP' a Technotizie](http://www.vitruviantux.net/wp-content/plugins/social-bookmarking-reloaded/technotizie.png)
留下回复