Excel Help Please!

Excel Help Please!

am 10.08.2007 18:47:05 von Louis

I am trying to use php to update a spreadsheet (MS Excel or OpenOffice
Calc) with data from MySQL.

I looked into PEAR::Spreadsheet_Excel_Writer if it will do the job. If I
understand it correctly, it basically creates spreadsheets, but not
opening an existing spreadsheet and then updating and saving it, which
is what I want to do.

Do you know if there is any package out there that can do what I described?

Thanks you.

Re: Excel Help Please!

am 10.08.2007 18:56:53 von luiheidsgoeroe

On Fri, 10 Aug 2007 18:47:05 +0200, Louis wrote:

> I am trying to use php to update a spreadsheet (MS Excel or OpenOffice
> Calc) with data from MySQL.
>
> I looked into PEAR::Spreadsheet_Excel_Writer if it will do the job. If I
> understand it correctly, it basically creates spreadsheets, but not
> opening an existing spreadsheet and then updating and saving it, which
> is what I want to do.
>
> Do you know if there is any package out there that can do what I
> described?

If you can get directly to the database, I'd advise skipping PHP all
together, and make an ODBC connection to MySQL, which Excel itself can
then use as it's datasource.
--
Rik Wasmus

Re: Excel Help Please!

am 10.08.2007 20:06:42 von Louis

> If you can get directly to the database, I'd advise skipping PHP all
> together, and make an ODBC connection to MySQL, which Excel itself can
> then use as it's datasource.

I missed mentioning that the whole application starts from the web. I
have to trigger this Excel update operation through a button on the web
form.

When user clicks the button, I start a javascript function and that's
where I contemplate options of doing this. One of the options is to use
ajax request to call a php script on the server, and that's the question
I have on this newsgroup.

The other option is to run a perl script instead of php on the server to
do this. I have an example of perl script to update excel. However I
have no idea how to get apache to execute this perl code as a script
instead of a cgi script which displays the perl script code!

Thanks for your time.

Re: Excel Help Please!

am 10.08.2007 23:23:01 von nc

On Aug 10, 11:06 am, Louis wrote:
>
> I missed mentioning that the whole application starts
> from the web. I have to trigger this Excel update operation
> through a button on the web form.

Er, something doesn't make sense here. The Excel spreadsheet that
needs updating resides on Computer A. The Web application and its
data reside on Computer B. If you want data updated on Computer A,
but trigger this update from Computer B, Computer B needs read-write
access to Computer A (read to get the existing spreadsheet, write to
update it)... Can you provide it?

In actual systems (Bloomberg Excel API comes to mind), the initiative
usually comes from within an Excel spreadsheet. You write an add-on
that implements one or more custom spreadsheet functions; every time
the spreadsheet is opened (or even in real-time, if you prefer), the
add-on connects to your Web service and retrieves the data requested
by cells containing the calls to custom functions...

Cheers,
NC

Re: Excel Help Please!

am 11.08.2007 01:29:31 von AlterEgo

Louis,

Do you want to save the spreadsheet on the server, or on the users PC?

-- Bill

"Louis" wrote in message
news:dE0vi.101080$xk5.28443@edtnps82...
>I am trying to use php to update a spreadsheet (MS Excel or OpenOffice
>Calc) with data from MySQL.
>
> I looked into PEAR::Spreadsheet_Excel_Writer if it will do the job. If I
> understand it correctly, it basically creates spreadsheets, but not
> opening an existing spreadsheet and then updating and saving it, which is
> what I want to do.
>
> Do you know if there is any package out there that can do what I
> described?
>
> Thanks you.

Re: Excel Help Please!

am 11.08.2007 06:57:50 von Louis

AlterEgo wrote:
> Louis,
>
> Do you want to save the spreadsheet on the server, or on the users PC?
>
I am thinking of storing the spreadsheet on the server.
Thank you.