473,387 Members | 3,787 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Opening Excel on client side

Hello,

i am starting PHP, and after 2 days of search, i am posting.

MY PURPOSE : opening a XLS files (in MS Excel) on the client side, the
user can update anything, then it will be automaticly saved on the
server again (when client use save button or close Excel).

MY TESTS : I had coded that (in php) :
echo "<FORM METHOD=post TARGET=_blank> ";
echo "<INPUT TYPE='button' VALUE=Open the file'
onClick='ouvrir(\"myfileexcel.xls\")'>";
echo "</FORM>";
---------------------------------------------------------------------------*-----

Actualy that doesn't work, my button is here but do nothing when you
clic it.
---------------------------------------------------------------------------*-----
function ouvrir($nomfic)
{
# test to check the call :
echo "COUCOU";
# $workbook = "docs/".$nomfic;
# $sheet = "myshet";
# $ex = new COM("Excel.sheet");
# $wkb = $ex->application->Workbooks->Open($workbook) or Die ("File do
not open");
# $ex->application->ActiveWorkbook->Close("False");
# unset ($ex);
}
MY QUESTION : Anyone know how to do this (with code example plz) ?

PS : i am french so sorry for my bad english.

Dec 20 '05 #1
8 4585
je*************@province-sud.nc says...
MY PURPOSE : opening a XLS files (in MS Excel) on the client side, the
user can update anything, then it will be automaticly saved on the
server again (when client use save button or close Excel).


Impossible to be able to do if the client has even the smallest ideas
about security of their own computer. I will NEVER allow a web site to
spawn an executable program on my client, let alone know to where on my
file system I may choose to save it as a download.

You are using the wrong application methodology, trying to hammer a nail
with a screwdriver. What you need to achieve this is MS Terminal Server
or Citrix.

Geoff M

Dec 20 '05 #2
it's an intranet (not internet) so security isn't my problem.
Plus i already hammered a nail with a screwdriver....several times,
it's painfull (specialy for my fingers) but can be done.. ;-))

Djim.

Dec 20 '05 #3
If you pass the browser an xls file, it will auto open most client's
excel (or an excel plugin) to read the doc..

Dec 20 '05 #4
Yes it open my file, but user can't save it back directly on the server.

Dec 21 '05 #5
Djim wrote:
Hello,

i am starting PHP, and after 2 days of search, i am posting.

MY PURPOSE : opening a XLS files (in MS Excel) on the client side, the
user can update anything, then it will be automaticly saved on the
server again (when client use save button or close Excel).

MY TESTS : I had coded that (in php) :
echo "<FORM METHOD=post TARGET=_blank> ";
echo "<INPUT TYPE='button' VALUE=Open the file'
onClick='ouvrir(\"myfileexcel.xls\")'>";
echo "</FORM>";
---------------------------------------------------------------------------*-----

Actualy that doesn't work, my button is here but do nothing when you
clic it.
---------------------------------------------------------------------------*-----
function ouvrir($nomfic)
{
# test to check the call :
echo "COUCOU";
# $workbook = "docs/".$nomfic;
# $sheet = "myshet";
# $ex = new COM("Excel.sheet");
# $wkb = $ex->application->Workbooks->Open($workbook) or Die ("File do
not open");
# $ex->application->ActiveWorkbook->Close("False");
# unset ($ex);
}
MY QUESTION : Anyone know how to do this (with code example plz) ?

PS : i am french so sorry for my bad english.

PHP se lance chez le serveur. Lorsque l'utilisateur voit le bouton, PHP
s'est évanoué.
Seulement un système au client, p.e. Javascript, peut se lancer par
onClick - mais il n'aura pas accès aux fichiers sur le serveur.

Si l'utilisateur demande une nouvelle page ( par submit ou par un lien )
le PHP de cette page pourra ouvrir et afficher un fichier. Mais ça ne
permettra pas que l'utilisateur y puisse faire des changements au
fichier. Le script peut l'envoyé comme download, puis l'utilisateur
pourra lancer son propre Excel s'il y en a, mais il n'y aura aucun
methode de rentre le fichier changé au serveur.

Je ne sais aucun moyen d'arriver à ce que vous voulez.

Colin

Désolé pour ma mauvaise français.
Dec 21 '05 #6
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Djim wrote:
Yes it open my file, but user can't save it back directly on the server.


Use a PUT-enabled webserver (webdav-like), and make sure that the client app
(i.e. excel) is able to save to http:// URLs.

At least, any KDE app can do it...

- --
- ----------------------------------
Iván Sánchez Ortega -i-punto-sanchez--arroba-mirame-punto-net

Give a man a fish, he owes you one fish.
Teach a man to fish, you give up your monopoly on fisheries.
(read on slashdot.org)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFDqLn43jcQ2mg3Pc8RApSuAJ9wUeEEHFvJF3rNzEBciB fx7zg/egCeJ8P+
Qi6aIAJNxmIn5J6zJF6hNCk=
=c10+
-----END PGP SIGNATURE-----
Dec 21 '05 #7
For the level of integration you desire, you will probably need to use
an ActiveX control, that in turn hosts the Excel ActiveX control. With
a RAD tool like Borland Delphi or VB, you can do it fairly easily. Drag
an Excel control and a web access component, add a few lines of code,
then bingo!

Dec 21 '05 #8
Ok thx all for the tips, and specialy Colin with nice french ;-))

Dec 21 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Miguel Orrego | last post by:
Hi, Does anybody know some code that opens a spreadsheet in excel rather than the browser? If possible something that can be used with response.redirect, however this isn't essential. I have a...
2
by: Jane | last post by:
I have a web application, it opens up excel when you click on a button. It works fine on my local machine. But when I upload the application to the server, i get this error message: COM object...
2
by: Fred | last post by:
Hi. How do I import while mapping an excel table to an access table please??? I've searched around and all I can find is a software product or code that does the same thing as the access...
3
by: Yohancef Chin | last post by:
Hi, Being fairly new to .NET I am looking for a way to call MS Word from an event on a webform, and after the user is finished save that created document to an SQL Server database. Has anyone...
2
by: Matt Hamilton | last post by:
I have an application page with a datagrid with a checkbox on each row. The user should check the rows they want to modify and then click a button. When the button is clicked, I have a Click...
6
by: Steve Richter | last post by:
I am getting error in a vbscript: ActiveX component cant create object: Excel.Application. The vbscript code is: Dim objExcel Set objExcel = CreateObject("Excel.Application") I am pretty...
6
by: Mark Rae | last post by:
Hi, My client has asked me to provide a "quick and dirty" way to export the contents of a DataGrid to both Excel for analysis and Word for editing and printing, so I'm investigating client-side...
1
by: T | last post by:
Currently there is an excel shortcut available on the network with links to 30 or so access db (97 & 2003), since the users are complaining about all the messages from excel (already open, do you...
1
by: mohitpande | last post by:
i am using windows 2003 server and iis 5.1 for hosting my web application and windows xp as client OS i ahv excel reports in my web application which are not opening in client machine i hav...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.