Forum Moderators: coopster

Message Too Old, No Replies

Can PHP Interview an Excel spreadsheet?

Looking for something quick and dirty

         

limbo

8:50 am on Aug 9, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have a client who'd like to update a few lists of data in their primary format (Excel). I don't really want to employ a database as the job is not well paid and I'd like to make it simple as possible for them.

So I wonder if there is a PHP (.asp?) method of interviewing an excel spreadsheet - so that my client can make changes to the spreadsheet, upload it and any pages that reference one or more table cells are updated too.

I'm guessing I will need additional software on the server... It seems to me to be a very clunky way of doing things but as I say I need 'quick and dirty' - the simpler the better.

Cheers, Limbo.

[edited by: limbo at 9:13 am (utc) on Aug. 9, 2006]

IanKelley

9:08 am on Aug 9, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



This may be what you're looking for:
[pear.php.net...]

limbo

9:27 am on Aug 9, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks for the reply Ian

Correct me if I'm wrong but, as far as I can tell by skimming the support docs on that site - that module creates excel files - I am looking for scripts that look for and display info from an existing spreadsheet on the server.

I want it to do something akin to this:


<table>
<tr>
<td>[cell info=[my_excel_table.xls]sheet1!$a$1]</td>
<td>[cell info=[my_excel_table.xls]sheet1!$b$1]</td>
<td>[cell info=[my_excel_table.xls]sheet1!$c$1]</td>
<td>[cell info=[my_excel_table.xls]sheet1!$d$1]</td>
</tr>
<tr>
<td>[cell info=[my_excel_table.xls]sheet2!$a$1]</td>
<td>[cell info=[my_excel_table.xls]sheet2!$b$1]</td>
<td>[cell info=[my_excel_table.xls]sheet2!$c$1]</td>
<td>[cell info=[my_excel_table.xls]sheet2!$d$1]</td>
</tr>
</table>

?

pixeltierra

5:25 am on Aug 10, 2006 (gmt 0)

10+ Year Member



Make them use access if they have to use MS products. Then interface with the access file with odbc. Spreadsheets are asking for bad data.

coopster

3:14 pm on Aug 21, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Have your client use whatever spreadsheet application they prefer but save the document as tab-delimited text. Then use PHP to open and parse the data accordingly. Here is one example ...
[webmasterworld.com...]

bcolflesh

3:21 pm on Aug 21, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you have PEAR installed, the Structures_DataGrid_Renderer_XLS package is good for this:

[pear.php.net...]

You can use Spreadsheet_Excel_Writer to output back to Excel as well:

[pear.php.net...]