My SL 2.0 application needs to provide user with something like a list of attachments (similar to a e-mail client program) and user should be able to double-click desired item to open attachment in appropriate program, for example .doc in Word, .xls in Excel,
etc. Is there any way to achieve this?
Here you said you allow users to click on attachment and open it. As you know, default programs are set inside the Control Panel, it doesnt make sense you can force the user to open it in particular program. In addition to you point, it is feasible to do
that you said, open the desired attachment.
Thank you for the reply, I'm sorry, I didn't explain the task clearly enough. Actually the problem consists of 2 parts:
- Of course it's possible to use browser's open file feature, but we need to allow user easily edit file and save back to server.
- On other hand we do not want user to download attachment file from server every time he want to view or edit it. Possible solution is Isolated storage however it allow just to open file as stream - I think I can't ask Windows to run command like as "start
<stream>".
If you really want to view the .xls or .doc files inside your Silverlight application, you can overlay ActiveX component which reads Word and Excel files and manipulate it through javascript.
Your getting some bad information on this site. Yes you can very easily do a BASIC editing of Excel sheets in Silvelright using the HTML bridge. I did this for a project I am working on (can't post the code obviously). However, I can point you in the
right direction from where I started.
mikle74
0 Points
3 Posts
Open Excel file from SL app?
Nov 04, 2008 03:03 PM | LINK
Hello,
My SL 2.0 application needs to provide user with something like a list of attachments (similar to a e-mail client program) and user should be able to double-click desired item to open attachment in appropriate program, for example .doc in Word, .xls in Excel, etc. Is there any way to achieve this?
Thanks in advance,
Mick
SteveWong
Contributor
6719 Points
1346 Posts
Re: Open Excel file from SL app?
Nov 04, 2008 03:51 PM | LINK
I dont exactly get what you mean.
Here you said you allow users to click on attachment and open it. As you know, default programs are set inside the Control Panel, it doesnt make sense you can force the user to open it in particular program. In addition to you point, it is feasible to do that you said, open the desired attachment.
Here we use the Browser to help us:
HtmlPage.Window.Navigate(new Uri(http://mytarget/attach.doc),"_blank");
SteveWong (HongKong)
Please mark post as answer if they help you
mikle74
0 Points
3 Posts
Re: Open Excel file from SL app?
Nov 04, 2008 09:30 PM | LINK
Hello Steve,
Thank you for the reply, I'm sorry, I didn't explain the task clearly enough. Actually the problem consists of 2 parts:
- Of course it's possible to use browser's open file feature, but we need to allow user easily edit file and save back to server.
- On other hand we do not want user to download attachment file from server every time he want to view or edit it. Possible solution is Isolated storage however it allow just to open file as stream - I think I can't ask Windows to run command like as "start <stream>".
Thanks,
Mick.
desmonduz85
Member
27 Points
42 Posts
Re: Open Excel file from SL app?
Nov 05, 2008 02:22 AM | LINK
If you really want to view the .xls or .doc files inside your Silverlight application, you can overlay ActiveX component which reads Word and Excel files and manipulate it through javascript.
xsdf
Member
177 Points
255 Posts
Re: Open Excel file from SL app?
Nov 05, 2008 03:10 AM | LINK
The Office will has online edition .
So , later you can do that.
To be or not to be, it's not a question ,it's life.
david.yanez.v
Member
397 Points
69 Posts
Re: Open Excel file from SL app?
Nov 05, 2008 03:48 AM | LINK
Hi
with silverlight you can not implement the xls framework part of .net.
U need a service that can open xls and make silverlight request that action and wait for the results.
regards
David !!!
bartczernicki
Contributor
5212 Points
953 Posts
Re: Open Excel file from SL app?
Nov 05, 2008 04:47 AM | LINK
Your getting some bad information on this site. Yes you can very easily do a BASIC editing of Excel sheets in Silvelright using the HTML bridge. I did this for a project I am working on (can't post the code obviously). However, I can point you in the right direction from where I started.
http://mattberseth.com/blog/2007/04/export_gridview_to_excel_1.html
Its not exactly what you are looking for, however based on your requirements you posted you should be able to easily convert this to what you need.
Bart Czernicki
http://www.silverlighthack.com | My new Silverlight and Business Intelligence Book
mikle74
0 Points
3 Posts
Re: Open Excel file from SL app?
Nov 05, 2008 08:18 AM | LINK
Hello,
Thanks a lot to all who replied my message, it looks there is no common approach that can be used for all possible file types.
Thanks,
Mick.