If you absolutely need an xls file (instead of just csv), the FileHelpers library makes it easy to write an xls file.
FileHelpers takes a strongly typed class and writes it as a csv or xls, or can connect directly to a SQL server and save records there.
Basically, you'd have something like:
public class Record {
public string filename;
public string storedProc;
}
You could use Robert Harvey's code or a regex to extract the path and procedure names, create a new Record
, and drop them in the new object.
Record r = new Record();
r.filename = myString.Substring(0, myString.IndexOf(".cs"),3);
r.storedProc= myString.Substring(myString.IndexOf("proc_")).Substring(0, temp.IndexOf('\"'));
You can then use the ExcelStorage class to save the file.