Re: [symfony-users] Open an Excel file

2010-01-15 Thread Gareth McCumskey
With just plain old PHP and even some Javascript built in this is actually very 
difficult if not impossible to do as PHP was never designed to interact with a 
users PC. Javascript was however designed to run client-side but does not have 
direct access to a users hard drive for obvious security reasons. The only way 
you may get past this is to use another plugin. I am not sure which plugin 
would be useful, perhaps Flash, but as far as I know even Java (not Javascript) 
cannot do this (but I stand to be corrected on that). You may also want to look 
into Google Gears (which I have not yet used). The problem with these scenarios 
is that you will need the user to download a plugin for their browser.

Essentially, the easiest way is to let them upload, the changes are made by 
PHP, then PHP prompts the user to re-download the changed file.

Regards

Gareth McCumskey

- Original Message -
From: bibijosh dorothee.arno...@gmail.com
To: symfony users symfony-users@googlegroups.com
Sent: Thursday, January 14, 2010 7:02:43 PM GMT +02:00 Harare / Pretoria
Subject: [symfony-users] Open an Excel file

Hi, I'm quite new to Symfony, and not really good at php in the first
place. So if someone could give me a hand here.

Here is what my website does for now :
 - Open an explorer window so the user can upload an excel file
 - Modify that file
 - Save it on my server.

Here is what I would like to do :
 - Open an explorer window so the user can upload an excel file
 - Modify that file AND THEN open it in an Excel Window. (I can only
manage to display it in my webpage, whichdoesn't look good at all,
I heard it could be because of the mime type actions...)
AND/OR
 - Save it on the user's computer, where it was first uploaded from,
without the user having to do anything.

I'll welcome any advice.

I'm using php5, Symfony 1.0 and IE 6

-- 
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




Re: [symfony-users] Open an Excel file

2010-01-15 Thread DEEPAK BHATIA
Hi I used the

I used the sfPhpExcelPlugin-1.0.2.zip from the

http://www.symfony-project.org/plugins/sfPhpExcelPlugin/1_0_2


In this I used this both for creating an excel file and downloading the same
using PHP.

Also I used the same for uploading an excel file and then reading the
contents of the excel file.

Regards

Deepak Bhatia

On Fri, Jan 15, 2010 at 1:45 PM, Gareth McCumskey gmccums...@gmail.comwrote:

 With just plain old PHP and even some Javascript built in this is actually
 very difficult if not impossible to do as PHP was never designed to interact
 with a users PC. Javascript was however designed to run client-side but does
 not have direct access to a users hard drive for obvious security reasons.
 The only way you may get past this is to use another plugin. I am not sure
 which plugin would be useful, perhaps Flash, but as far as I know even Java
 (not Javascript) cannot do this (but I stand to be corrected on that). You
 may also want to look into Google Gears (which I have not yet used). The
 problem with these scenarios is that you will need the user to download a
 plugin for their browser.

 Essentially, the easiest way is to let them upload, the changes are made by
 PHP, then PHP prompts the user to re-download the changed file.

 Regards

 Gareth McCumskey

 - Original Message -
 From: bibijosh dorothee.arno...@gmail.com
 To: symfony users symfony-users@googlegroups.com
 Sent: Thursday, January 14, 2010 7:02:43 PM GMT +02:00 Harare / Pretoria
 Subject: [symfony-users] Open an Excel file

 Hi, I'm quite new to Symfony, and not really good at php in the first
 place. So if someone could give me a hand here.

 Here is what my website does for now :
  - Open an explorer window so the user can upload an excel file
  - Modify that file
  - Save it on my server.

 Here is what I would like to do :
  - Open an explorer window so the user can upload an excel file
  - Modify that file AND THEN open it in an Excel Window. (I can only
 manage to display it in my webpage, whichdoesn't look good at all,
 I heard it could be because of the mime type actions...)
 AND/OR
  - Save it on the user's computer, where it was first uploaded from,
 without the user having to do anything.

 I'll welcome any advice.

 I'm using php5, Symfony 1.0 and IE 6

 --
 You received this message because you are subscribed to the Google Groups
 symfony users group.
 To post to this group, send email to symfony-us...@googlegroups.com.
 To unsubscribe from this group, send email to
 symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en.



 --
 You received this message because you are subscribed to the Google Groups
 symfony users group.
 To post to this group, send email to symfony-us...@googlegroups.com.
 To unsubscribe from this group, send email to
 symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en.




-- 

You received this message because you are subscribed to the Google Groups "symfony users" group.

To post to this group, send email to symfony-us...@googlegroups.com.

To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.



Re: [symfony-users] Open an Excel file

2010-01-15 Thread Benoit Montuelle
Hi,

I think there may be at least 2 solutions :

1st)
- Make for form so user can upload one or more file
- Modify that file in php, this point may be though, as php excel writers
have generally limited support. You can try something like this
http://pear.php.net/package/Spreadsheet_Excel_Writer , or if possible use
xlsx which is XML data.
- Redirect the browser and force downloading the file, the user will have to
accept the download and choose place where to put it.

2nd) As your clients are IE6 you can use some kind of activeX to handle xls
files directly on user's computer, if you're not fluent in php but are in
C#, VB or C++ this can be a better solultion.
Somme dll's already exists to modify/generate excel files But the main
disadvantage is that it will never work on any other browser than IE. As far
as I know with activeX autorised by browser you can have access to full
computer ressources, as a regular windows program.
Once I saw an app that can : interact with scanner device on local computer,
process picture to pdf on local computer, then upload it back to the server.
The server was PHP5 (without OSS framework) and client were winXP+IE6

I Know generally PHP developers avoid solution like this because of its
compatibility problem, but it still exists and being used by many intranet
apps.

Last but not least, if you're starting a new app, don't use symfony 1.0,
you'll find more reliable ressources for symfony 1.4 now.

Regards

2010/1/14 bibijosh dorothee.arno...@gmail.com

 Hi, I'm quite new to Symfony, and not really good at php in the first
 place. So if someone could give me a hand here.

 Here is what my website does for now :
  - Open an explorer window so the user can upload an excel file
  - Modify that file
  - Save it on my server.

 Here is what I would like to do :
  - Open an explorer window so the user can upload an excel file
  - Modify that file AND THEN open it in an Excel Window. (I can only
 manage to display it in my webpage, whichdoesn't look good at all,
 I heard it could be because of the mime type actions...)
 AND/OR
  - Save it on the user's computer, where it was first uploaded from,
 without the user having to do anything.

 I'll welcome any advice.

 I'm using php5, Symfony 1.0 and IE 6

 --
 You received this message because you are subscribed to the Google Groups
 symfony users group.
 To post to this group, send email to symfony-us...@googlegroups.com.
 To unsubscribe from this group, send email to
 symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en.




-- 

You received this message because you are subscribed to the Google Groups "symfony users" group.

To post to this group, send email to symfony-us...@googlegroups.com.

To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] Open an Excel file

2010-01-14 Thread bibijosh
Hi, I'm quite new to Symfony, and not really good at php in the first
place. So if someone could give me a hand here.

Here is what my website does for now :
 - Open an explorer window so the user can upload an excel file
 - Modify that file
 - Save it on my server.

Here is what I would like to do :
 - Open an explorer window so the user can upload an excel file
 - Modify that file AND THEN open it in an Excel Window. (I can only
manage to display it in my webpage, whichdoesn't look good at all,
I heard it could be because of the mime type actions...)
AND/OR
 - Save it on the user's computer, where it was first uploaded from,
without the user having to do anything.

I'll welcome any advice.

I'm using php5, Symfony 1.0 and IE 6
-- 
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.