Jaiprakash Barnwal
Jaiprakash Barnwal

Reputation: 1

Need to open the file in client's machine

The question is related to asp.net web site application.

Requirement 1: Need to open an excel file in clients' machine and allow the user/client to modify the opened excel file.

// After downloading file from ftp location to below path 'excelPath'
String excelPath = Path.Combine(System.Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "MyApp", "Excel1.xlsx");
System.Diagnostics.Process.Start(excelPath);

Output: Above code working fine with visual studio, but not working after hosting it. Also it seems the file will open in server machine but my requirement is to open it in client machine.

Note: for hosting I am using Microsoft Server 2008 R2.

Upvotes: 0

Views: 1197

Answers (3)

Jaiprakash Barnwal
Jaiprakash Barnwal

Reputation: 1

I used a Desktop application to fix this. Implemented a flag to check whether the user is logged in, if user is logged in downloaded the excel file and opened it, and pushing data to server periodically till the user is logged in.

This solved my requirements.

Thanks all for there helpful comments.

Upvotes: 0

Muhammad Gouda
Muhammad Gouda

Reputation: 869

Don't use Process.Start as it will not work on client machine Rather provide a link to the excel file and when the user will click on it, s/he will be prompted to open

Upvotes: 0

opewix
opewix

Reputation: 5083

You cannot access client machine's file system, but user may upload his excel file to your application. Save uploaded file in storage. Let user edit uploaded file and then download it.

Upvotes: 5

Related Questions