Framework 1.1 - opening Excel file

Giganews Newsgroups
Subject: Framework 1.1 - opening Excel file
Posted by:  stainless (mark.wingfie…@sky.com)
Date: Fri, 10 Aug 2012

Currently, we are opening Excel files using the Response option:

            Response.ContentType=3D"application/x-msexcel";
            Response.AddHeader("Content-Disposition", "attachment; filename=3D" + lo=
calFileName);
            Response.WriteFile(fileName);
            Response.Flush();
            Response.Close();

filename is the actual Excel file (contains a macro) and localFileName is a=
suggested name for saving the data file produced.

I am looking at allowing the called Excel to take in command line parameter=
s using a GetCommandLine function in the Excel VBA (have tested Excel code =
tp do this and can read the full command line) but have not found a way of =
changing the C# code above to pass this through. Unfortunately, we are stuc=
k with Framework 1.1 for the time being so need a solution that is compatib=
le. Any ideas?

Cheers

Mark

Replies