site Search:


 
    All Forums Hot Topics Gallery






how-to block ads


 
Search Topic:
Uniqs:
1041
Share Topic
Posting?
Post a:
Post a:
Links: ·How To Get Noticed ·Web Monks FAQ ·Webhosting FAQ ·Posting Code ·How To Post ·Webhosting forum
AuthorAll Replies


johnnyboyct

join:2003-06-11
New Britain, CT
Reviews:
·Comcast

PHP read excel template?

Whats the best way to read an excel sheet with the formating and formulas left in place?

I have no problem writing, but Id like to use a template as a base
--
Connecticut Web Design and Development


theedj
Right Back At-Cha
Premium
join:2002-12-12
Calgary

I've never found anything PHP related that can directly handle input from an XLS...I've also had to convert to a CSV. If you're looking to make the template web based, wouldn't it be easier to recreate it online?



johnnyboyct

join:2003-06-11
New Britain, CT
Reviews:
·Comcast

reply to johnnyboyct
Ive found some stuff that works to read or write, but nothing that works well both ways. We have a few REALLY complex sheets and so far the only thing I can do is save it as xml, then customize the xml with data from the app. Its a pain in the ass though.
--
Connecticut Web Design and Development


Shark_615

join:2006-01-17
Pickering, ON

If you are running PHP on a Windows server I believe you can open excel docs naively using COM or something. Its slow and horrible but would probably work.

Outside of that improbably setup there really isn't a way and I have researched it a bit.



johnnyboyct

join:2003-06-11
New Britain, CT

Hmmm, any links describing the com thing? I have no clue what to google.



yock
TFTC
Premium
join:2000-11-21
Miamisburg, OH
kudos:3

reply to johnnyboyct
Let me see if I understand. You have an Excel spreadsheet that you with to open as a web page, modify, and save the modifications back to a web page? You're esentially using Excel as the data back-end for a web application?



johnnyboyct

join:2003-06-11
New Britain, CT
Reviews:
·Comcast

reply to johnnyboyct
Not really,

Right now, they use a spreedsheet for this big long project process that consists of about 5 tabs. My app does 4 of 5.

But there's a ton of calculations on the next tab of the sheet that the web app doesn't do.

Id like to read the file with formatting, and calcs, and just fill in the blanks. The only way I have found so far is to:

in excel output the sheet as XML
Regenerate that xml with my blanks filled in

But its like 100000 lines
--
Connecticut Web Design and Development



yock
TFTC
Premium
join:2000-11-21
Miamisburg, OH
kudos:3

Excel spreadsheets are limited to 65,535 lines, but I get your point. In all honesty, Excel shouldn't be levereged in this way. Though it is technically capable, it isn't designed for highly complex and/or mission critical financial calculations. I've seen entire accounting departments running on Excel/VBA solutions, but that doesn't make it right.

If you're already producing the input data for this application, why not implement a web application that replaces this spreadsheet entirely?



johnnyboyct

join:2003-06-11
New Britain, CT
Reviews:
·Comcast

Well thats the goal, and Ive done 4 of 5 sheets, but the last sheet is a nightmare. Ive recreated 80% of it with ajax and JS, but really its overkill. They cant address the real issues atm so I end up recreating a flawed spreadsheet...
--
Connecticut Web Design and Development



yock
TFTC
Premium
join:2000-11-21
Miamisburg, OH
kudos:3

I presume that "can't" is because of looming year-end festivities?


Shark_615

join:2006-01-17
Pickering, ON

reply to johnnyboyct
If the sheets are that big and complex then the script will time out as using Excel naively on PHP is slow; brutally, noticeably slow. COM is basically a windows thing that allows apps to talk to other apps... If you want to try it start:

»ca.php.net/manual/en/book.com.php
»devzone.zend.com/article/3336-Re···with-php

Non COM option that requires PHP5:
»www.eephp.com/

haven't used it...yet... but if you find success with it let me know.


Thursday, 31-May 06:55:23 Terms of Use & Privacy | feedback | contact | Hosting by nac.net - DSL,Hosting & Co-lo
over 12.5 years online © 1999-2012 dslreports.com.
Most commented news this week
Hot Topics