-1

Is it possible to create a CSV file with C#, open the file but not saving it?

Venyla
  • 87
  • 2
  • 6

1 Answers1

1

CSV is a format. You can build this format in memory without persisting it to disk. Is that what you mean? How do you want to "open" the file? For example Excel only works with existing files, or you can use interop to fill the data in a new document.

CodeCaster
  • 147,647
  • 23
  • 218
  • 272
  • 1
    I wanted to open it with Excel, but I just want to write the data in it so the user can look at it and if he want to save it he can save where ever he want to. – Venyla Feb 13 '14 at 12:25
  • Then take a look at [How to: Use COM Interop to Create an Excel Spreadsheet (C# Programming Guide)](http://msdn.microsoft.com/en-us/library/ms173186(v=vs.80).aspx). – CodeCaster Feb 13 '14 at 12:25