Opening/Editing/Saving Excel To Server
Hello,

I want to be able to open an excel document, edit it, then save
the changes on a server computer.

I would like to be able to edit the excel document in the browser
like this would do below. (Except I have not figured out how to
make it open a currently made excel file)

(Click open, not save)

 
<?php 

header("Content-Type: application/vnd.ms-excel"); 
header("Expires: 0"); 
header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); 
header("Content-Disposition: inline; filename=c:/test.xls"); 

?> 

I would like to use something like that but with a save and print
button added to save it to server or print to users printer.

Ok heres a little background on why I'm doing this, so if you cant
figure out how to make this work give me some other way of
doing this.

I'm making a website that allows excel documents to be
uploaded to the server (or created on the server using PHP) for
each project that the workplace has, then any employee will be
able to come and view what the excel has to say, edit it
depending on what went on when he did the project, and save it
to the server again. (Also making it so only one employee at a
time can edit the excel doc to avoid overwriting)(maybe auth later
that makes it so only employees working on project will be able
to)

Anyone know how to do this?
Maybe there is a PHP module/plugin that allows this to happen?

Maybe I should rework how this should happen? (example:
maybe take away the saving to server and make it save to client
then upload it)

Thanks in advance!

P.S. Yes I know I posted it in 2 differant forums, I didnt mean to
post it in the other one because I didnt know I was in that forum
at the time.

    Hi Wraith2700,

    Not entirely sure whether you will be able to write to the excel file, but here are some wild possibilities.

    1) PHP Module: ODBC.
    Use ODBC to create a static connection to a fixed excel file. (I've not tried this personally).

    2) Convert all uploaded excel files into CSV for storage on the server. Then read/write the files in CSV format natively, which is compatible with Microsoft excel in the event that you need to download the file.

    Cheers,
    Alvin.

      Hello I know how to create on the fly Word and Excel files, using a script.. but in PERL 😉

      I had not found any simmilar library for PHP yet 🙁 so, if you want to use PHP for your site and just PERL for the file generation, this can help you.

      Check this links:
      http://aspn.activestate.com/ASPN/docs/ActivePerl-5.6/faq/Windows/ActivePerl-Winfaq12.html

      http://aspn.activestate.com/ASPN/docs/ActivePerl-5.6/site/lib/Win32/OLE.html

      How ever, that library I think works only under windows server that has the excel installed (I dont remember intalled it under Unix). So install the Win Apache & Active Perl & of Course PHP!

      I also had this document that says What's the "Excel format file specification", and says how an excel file has to be generated. The doc is from the last century 😃 (1998) so it can be a little, just a little out of date 😃 But what the h... the new excels still open files from excell 1 😃

        Write a Reply...