Nicholas, thanks for your help. According to your thought I assume
this would work as an example but it does not, the test2.xls file can
still not be opened:
FileStream fileStream = new FileStream("c:/temp/test.xls",
FileMode.Open);
StreamReader reader = new StreamReader(fileStream);
FileStream fileStream2 = new FileStream("c:/temp/test2.xls",
FileMode.Create, FileAccess.Write);
StreamWriter writer = new StreamWriter(fileStream2);
writer.BaseStream.Seek(0, SeekOrigin.End);
writer.WriteLine(reader.ReadToEnd());
writer.Flush();
I am aware my answer creates a new thread, seems to be something wrong
with the "post-a-reply" link...
/Axel
|