闲来无事突然冒出一个想法,由于工作原因,服务器每天会自动生成一个excel文件,如果可以通过php来读取,就可以每天定时更新excel,通过浏览器即可查询excel中的数据
效果图:
实现方法是使用PHPExcel1.8版本的类,下载地址:https://github.com/PHPOffice/PHPExcel
官方文档中有很多例子,大家可以研究学习下
1、上传PHPExcel目录&PHPExcel.php到网站目录
实现代码:
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>虚拟机信息查询</title> </head> <body> <h1 style="text-align:center">测试 VMinfo:</h1> <h4 style="margin-left:238px">请通过Ctrl+F进行关键字搜索</h4> <?php /** Include path **/ set_include_path(get_include_path() . PATH_SEPARATOR . '../../../vminfo/'); /** PHPExcel_IOFactory */ include 'PHPExcel/IOFactory.php'; $inputFileName = './vminfo.xlsx'; $excelReader = PHPExcel_IOFactory::createReaderForFile($inputFileName); $excelObj = $excelReader->load($inputFileName); $worksheet = $excelObj->getSheet(0); $lastRow = $worksheet->getHighestRow(); echo "<table align=center valign=middle border=1 cellspacing=0 cellpadding=0>"; for ($row = 1; $row <= $lastRow; $row++) { echo "<tr><td>"; echo $worksheet->getCell('A'.$row)->getValue(); echo "</td><td>"; echo $worksheet->getCell('B'.$row)->getValue(); echo "</td><td>"; echo $worksheet->getCell('C'.$row)->getValue(); echo "</td><td>"; echo $worksheet->getCell('D'.$row)->getFormattedValue();/**格式化日期值*/ echo "</td><tr>"; } echo "</table>"; ?> <body> </html>
其实还有很多内容没有研究,不过已经够我使用了~
2、附Windows向Linux目录复制文件脚本:
- 下载PSCP,解压到system32目录下
- 新建.bat批处理文件
PSCP -pw "password" d:\file [email protected]:/var/www/html/vminfo
- 新建计划任务,定时对网站目录下的excel文件进行更新
It’s hard to come by educated people in this particular topic, however, you sound like you know what you’re talking about! Thanks
Hello there! This post couldn’t be written much better! Looking through this article reminds me of my previous roommate! He continually kept preaching about this. I’ll forward this article to him. Fairly certain he will have a great read. Many thanks for sharing!
purchase synthroid online – triamcinolone 4mg pill buy hydroxychloroquine 400mg for sale
buy synthroid 150mcg – triamcinolone order order generic plaquenil 400mg
Thanks for the blog article.Really thank you! Cool.
I need to to thank you for this good read!! I definitely enjoyed every little bit of it. I have got you book-marked to check out new stuff you post…
I truly appreciate this blog article.Really looking forward to read more. Will read on…
I really like it when people come together and share thoughts. Great website, keep it up!
purchase albuterol for sale – order albuterol pill dapoxetine 60mg uk
order albuterol generic – help with research paper order priligy 30mg pill
https://erythromycinn.com/# erythromycin family
Thanks so much for the post.Thanks Again. Really Great.
3rv5i
rqgxp
lleu
Good day! I could have sworn Iíve been to your blog before but after browsing through many of the articles I realized itís new to me. Anyways, Iím certainly happy I stumbled upon it and Iíll be book-marking it and checking back regularly!
No matter if some one searches for his essential thing, thus he/she wishes to be available that in detail, so that thing is maintained over here.
Hi, I do believe your site could possibly be having internet browser compatibility issues. Whenever I look at your web site in Safari, it looks fine but when opening in IE, it’s got some overlapping issues. I merely wanted to give you a quick heads up! Other than that, excellent site.
Say, you got a nice article post.Much thanks again.
vardenafil 20mg cheap – cost levitra clomiphene without prescription
order vardenafil 20mg sale – order clomid 100mg generic generic clomid 50mg
Thanks for sharing, this is a fantastic article.Thanks Again. Cool.
Thank you ever so for you blog.Thanks Again. Keep writing.
Im obliged for the article post.Thanks Again. Awesome.
darknet market superlist versus darknet market
Thanks so much for the article post.Really thank you! Great.
Appreciate you sharing, great article post.Really looking forward to read more. Really Great.
lisinopril pills – purchase tenormin pill buy tenormin 100mg generic
order lisinopril 5mg online cheap – atenolol 100mg generic buy tenormin pills
I truly appreciate this blog post.
Thank you ever so for you article.Much thanks again. Much obliged.
This is a to a great extent respected post. Thanks for posting this. Erina Bruce Pendleton
https://erythromycinn.com/# erythromycin ophthalmic ointment
I used to be able to find good information from your content.
glucophage without prescription – norvasc 10mg usa norvasc tablet
purchase glucophage pill – order atorvastatin pill purchase norvasc pills
z4n7s
62j6q
[url=http://novrazbb.com/#]lmf1[/url]
Many thanks. I appreciate it!writing the essay thesis statement maker online professional resume writing services
I appreciate you sharing this blog article.Thanks Again. Keep writing.
purchase hydroxychloroquine sale – hydroxychloroquine 200mg over the counter order baricitinib 2mg generic
order hydroxychloroquine sale – chloroquine price oral baricitinib 4mg
7itg1
up9uf
siqn
I cannot thank you enough for the post. Really Great.
prednisone brand name in usa prednisone – prednisone online india
Hello there, just became alert to your blog through Google, and found that it’s really informative. I am gonna watch out for brussels. I’ll appreciate if you continue this in future. Many people will be benefited from your writing. Cheers!
https://erythromycin1m.com/# erythromycin ophthalmic solution
Thanks again for the blog post.Thanks Again. Awesome.
Awesome blog.Much thanks again. Want more.
order furosemide generic – generic furosemide 100mg ivermectin 12 mg pills
buy furosemide 100mg sale – buy furosemide 40mg without prescription ivermectin cost in usa
I cannot thank you enough for the blog article.Really thank you! Awesome.
It’s hard to find well-informed people for this subject, but you seem like you know what you’re talking about! Thanks
Very neat article.Really thank you! Will read on…
Excellent web site you have here.. It’s difficult to find high quality writing like yours nowadays. I really appreciate people like you! Take care!!
Howdy! This post couldn’t be written any better! Reading through this post reminds meof my previous roommate! He continually kept preaching aboutthis. I will send this article to him. Pretty sure he will havea very good read. Thanks for sharing!
I am so grateful for your post.Really thank you! Great.
order prednisolone 5mg for sale – viagra 50mg uk sildenafil brand
Very good info. Lucky me I ran across your blog by accident (stumbleupon). I’ve book marked it for later.
cheap prednisolone sale – order prednisolone 5mg generic sildenafil tablet
Thanks so much for the blog article.Really thank you! Great.
Hey, thanks for the post. Really Cool.
You should take part in a contest for one of the finest websites on the web. I most certainly will highly recommend this website!
I really like and appreciate your blog post.Really thank you! Want more.
Fantastic blog post.Much thanks again. Cool.
Thank you for your article post.Thanks Again. Want more.
Fantastic article post.Really thank you! Cool.
amoxil 500mg canada – cost viagra 150mg sildenafil 50mg canada
I used to be able to find good advice from your blog posts.
order generic amoxil 250mg – zithromax buy online buy sildenafil 100mg pills
erythromycin vs tetracycline erythromycin eye ointment for newborns
Say, you got a nice blog post.Really looking forward to read more. Really Great.
Wow, great blog article.Much thanks again. Keep writing.
Having read this I thought it was really enlightening. I appreciate you spending some time and energy to put this information together. I once again find myself spending way too much time both reading and commenting. But so what, it was still worth it!
Im obliged for the blog.Thanks Again. Awesome.
Im thankful for the blog.Thanks Again. Really Cool.
Enjoyed every bit of your blog article. Will read on…
deltasone 20mg pill – buy deltasone 5mg generic purchase isotretinoin generic
brand deltasone 10mg – deltasone 40mg over the counter isotretinoin pills
Great, thanks for sharing this post.Much thanks again. Much obliged.
Very neat article post. Fantastic.
Major thanks for the article.Really thank you! Keep writing.
I really liked your blog article.Thanks Again. Fantastic.
Great, thanks for sharing this article post. Fantastic.
cialis generic – order modafinil 200mg without prescription order modafinil online
order cialis 20mg – best cialis sites online buy provigil 100mg pills
It’s hard to find experienced people for this subject, but you sound like you know what you’re talking about! Thanks
Thanks for sharing, this is a fantastic blog article. Fantastic.
Very neat article.Really looking forward to read more.
erythromycin allergy https://erythromycinn.com/#
Way cool! Some extremely valid points! I appreciate you penning this article plus the rest of the site is also really good.
Thank you for your article.Thanks Again.
Major thanks for the blog article. Great.
Very informative blog post. Want more.
I like what you guys are usually up too. Such clever work and exposure! Keep up the fantastic works guys I’ve added you guys to blogroll.
I cannot thank you enough for the article.Much thanks again. Cool.
I’ll right away grasp your rss feed as I can notin finding your email subscription link or newsletter service.Do you have any? Please allow me recognize in orderthat I may just subscribe. Thanks.
Im thankful for the blog article.Much thanks again. Really Cool.
Great, thanks for sharing this article post. Great.
wow, awesome blog article.Much thanks again. Keep writing.
Very neat article.Thanks Again. Will read on…
order generic doxycycline – buy clomiphene 50mg buy tadalafil 5mg online
oral doxycycline 200mg – doxycycline sale buy tadalafil 5mg pill
Thanks a lot for the article post.Much thanks again. Great.
Very good post.Thanks Again. Great.
I loved your article post.Much thanks again. Fantastic.
Howdy! I just would like to give you a huge thumbs up for your great info you have right here on this post. I’ll be coming back to your blog for more soon.
I really enjoy the blog post.Really looking forward to read more. Really Great.
Asking questions are actually fastidious thing ifyou are not understanding something totally, except this paragraphoffers nice understanding yet.
I think this is a real great post.Really looking forward to read more. Really Cool.
ivermectin 12 mg pills – buy vardenafil generic oral vardenafil 20mg
buy ivermectin stromectol – levitra 20mg pill levitra medication
You completed a number of nice points there. I did a search on the issue and found nearly all people will have the same opinion with your blog.wise decisions
Muchos Gracias for your blog post.
Thanks for sharing, this is a fantastic blog article.Much thanks again. Fantastic.
I cannot thank you enough for the article post.Really thank you! Cool.
trimoxazole 800 trimethoprim sulfamethoxazole
Say, you got a nice blog post. Really Cool.
erythromycin topical erythromycin opthalmic ointment
Thank you ever so for you article post. Really Cool.
Enjoyed every bit of your blog.Really thank you! Much obliged.
cheap amoxicillin tablets – levitra 10mg without prescription order levitra 20mg online
5 percent for the Tier 1ratio, and 3 percent for the Tier 1 leverage ratio.
Looking forward to reading more. Great article post.Thanks Again. Much obliged.
Thanks-a-mundo for the blog article.Much thanks again. Want more.
Thank you for your blog post. Want more.
modafinil 100mg drug order modafinil for sale
Im thankful for the blog article.Really thank you! Want more.
I really enjoy the post.Thanks Again. Really Cool.
buy provigil 100mg online cheap order provigil 100mg sale
Thank you ever so for you article.Much thanks again. Awesome.
buy acillin – order cipro 1000mg pills cialis for women
buy provigil without prescription provigil 100mg canada order generic modafinil 200mg
modafinil 200mg uk
buy ampicillin 250mg pill – purchase cipro without prescription buy cialis 20mg sale
Enjoyed every bit of your blog article.Much thanks again. Keep writing.
modafinil 200mg oral provigil 100mg for sale modafinil without prescription
Thank you for your blog post.Really looking forward to read more. Awesome.
my family would always like to go on ski holidays because it is very enjoyable;
Muchos Gracias for your blog article.Really thank you! Cool.
Im grateful for the article.Much thanks again. Really Great.
I really liked your post.Really looking forward to read more. Much obliged.
Great post. Much obliged.
Great, thanks for sharing this article post.Really looking forward to read more. Awesome.
Awesome blog article.Thanks Again.
order modafinil 200mg buy modafinil 200mg sale order modafinil 100mg online cheap
order cefuroxime 250mg for sale – robaxin drug buy tadalafil sale
cefuroxime 250mg tablet – order robaxin pill cialis 20 mg
I appreciate, cause I discovered exactly what I was lookingfor. You have ended my four day lengthy hunt! God Bless youman. Have a great day. Bye
api erythromycin http://erythromycinn.com/#
I cannot thank you enough for the blog post. Cool.
A big thank you for your article.Much thanks again. Really Great.
modafinil 100mg cheap modafinil 200mg ca
When someone writes an piece of writing he/she maintains the thought of a user in his/her brain that how a user can be aware of it. Thus that’s why this post is outstdanding. Thanks!
I truly appreciate this blog article. Much obliged.
Very informative post. Great.
order modafinil 100mg sale order provigil 200mg online order provigil generic
sildenafil vs tadalafil – tadalafil liquid tadalafil generic name
Wow, great blog.Really looking forward to read more. Really Cool.
purchase modafinil generic order modafinil 100mg generic
Im grateful for the blog.Thanks Again. Really Cool.
Appreciate you sharing, great article post.Thanks Again. Great.
A big thank you for your article post. Much obliged.
Remarkable! Its really remarkable post, I have got much clear idea on the topic of from this post.
albuterol indications ventolin 200 mcg icd 10 cm code for albuterol what is albuterol sulfate hfa
Awesome blog.Much thanks again. Really Great.
I really like and appreciate your post.Really thank you! Much obliged.
budesonide over the counter – brand antabuse 500mg buy antabuse pills
rhinocort us – order disulfiram 500mg without prescription disulfiram pill
I am so grateful for your article. Great.
Im thankful for the blog post.Really thank you! Cool.
I loved your article post. Keep writing.
buy provigil 100mg for sale
Appreciate you sharing, great article post. Really Cool.
Awesome article.Much thanks again. Awesome.
Im thankful for the blog.Really thank you! Awesome.
I am so grateful for your blog post.Much thanks again. Really Great.
Thanks so much for the article post.Thanks Again. Awesome.
Thank you ever so for you blog.Thanks Again. Really Great.
order fildena 50mg online cheap – stromectol cost in usa ivermectin 12 mg for humans for sale
order sildenafil pill – ivermectin tablets purchase ivermectin
Appreciate you sharing, great blog post.Really looking forward to read more. Fantastic.
An interesting discussion is definitely worth comment. I believe that you ought to write more about this subject, it may not be a taboo subject but generally folks don’t speak about such issues. To the next! All the best!
wow, awesome article post.Thanks Again. Cool.
Really appreciate you sharing this post.Really looking forward to read more. Will read on…
big online pharmacy online pharmacies canadian
I really loved this article and I will return to see more of your lovely stuff. Thank you!
Good article. I am facing a few of these issues as well..
Very neat blog post.Thanks Again. Fantastic.
Looking forward to reading more. Great blog article. Fantastic.
amoxicillin generic amoxicillin 500 – azithromycin amoxicillin
[url=https://seroquel.store/]seroquel 50 mg tablet[/url]
order cephalexin 500mg sale – cephalexin pills order erythromycin without prescription
cephalexin 125mg price – cost cleocin 300mg erythromycin pill
I needed to thank you for this great read!! I definitely loved every little bit of it. I’ve got you book marked to check out new things you postÖ
Awesome article post.Really looking forward to read more. Keep writing.
Say, you got a nice article post.Thanks Again. Great.
Ergometer the muscles and instituting up-to-date abrasion may decrease. write my assignment for me Dlxggb oiotkf
purchase bactrim for sale – sulfamethoxazole cheap oral sildenafil 150mg
sulfamethoxazole cheap – cost sildenafil viagra 150mg price
[url=http://cialiscostonline.monster/]cialis 50[/url]
order augmentin 1000mg generic – order generic cialis 20mg buy cialis generic
buy augmentin 1000mg pills – augmentin 625mg uk order cialis without prescription
prednisolone sale – prednisolone online order cheap cialis generic
prednisolone 20mg oral – order prednisolone 20mg for sale buy cialis online cheap
order sildenafil 150mg generic – cheap viagra sale buy sildenafil 100mg
cost viagra 50mg – viagra sildenafil 50mg vardenafil online overnight delivery
order cipro 1000mg without prescription – cipro brand buy tadalafil 20mg pills
hollywood casino – online slot games order ampicillin 500mg without prescription
play casino – casino games online pay essay writing
simvastatin 20mg oral – essay writers online academic writers online
buy tamsulosin 0.4mg sale – order ondansetron generic order spironolactone 25mg pills
order isotretinoin online cheap – order generic amoxil 500mg order generic celecoxib
best ed medication – online drugs deltasone 20mg without prescription
modafinil brand – brand modafinil 100mg viagra tablet
order cialis pills – Overnight delivery cialis brand sildenafil 100mg
order doxycycline 200mg online cheap – chloroquine over the counter aralen brand
lasix 100mg sale – zithromax 250mg usa buy azithromycin 500mg
[url=http://silagrasildenafil.quest/]silagra 25 mg price[/url]
isotretinoin online buy – buy amoxicillin 500mg without prescription order amoxil 1000mg
ed pills cheap – buy ed pills online prednisone over the counter
viagra pills 25mg – order tadalafil 20mg for sale tadalafil generic
order dutasteride generic – purchase tadalafil without prescription generic cialis 5mg
topamax brand – sumatriptan 50mg usa imitrex oral
cialis 20mg drug – order cozaar 50mg pills brand coumadin
cialis pills 10mg – cialis overnight shipping usa purchasing viagra on the internet
furosemide 100mg generic – order furosemide buy viagra 50mg for sale
accutane ca – order amoxicillin 250mg zithromax online order
brand modafinil 200mg – pills for ed fda approved over the counter ed pills
buy tadalafil 20mg – Cialis no rx cialis 20mg ca
buy esomeprazole sale – order promethazine generic order promethazine sale
[url=http://ivermectinwb.quest/]stromectol price[/url]
buy viagra 50mg online cheap – cialis viagra sales buy viagra
buy generic sildenafil 150mg – plavix 150mg sale clopidogrel order
gloperba uk – inderal 10mg sale buy generic strattera 10mg
brand toradol – toradol 10mg tablet baclofen online
viagra 50mg without prescription – cialis 5mg cheap buy tadalafil 40mg generic
cheap generic viagra – sildenafil professional buy cyclobenzaprine 15mg for sale
purchase ezetimibe generic – order citalopram 40mg generic purchase celexa pill
order hydroxyzine 25mg – purchase hydroxyzine generic purchase crestor for sale
buy diltiazem pill – acyclovir 400mg canada purchase acyclovir without prescription
cheap generic cialis – cialis 20mg over the counter purchase cenforce without prescription
sildenafil 50mg pills – viagra mail order us gabapentin 100mg uk
cytotec price – synthroid 75mcg uk buy levothyroxine generic
cost desloratadine 5mg – desloratadine 5mg tablet aristocort 4mg pills
clomiphene 50mg brand – zyrtec 10mg cost order zyrtec 5mg online
pregabalin for sale online – pregabalin 75mg pills lyrica 150mg drug