how to write in different cells in excel file using stream writer

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • veer
    New Member
    • Jul 2007
    • 198

    how to write in different cells in excel file using stream writer

    Hi
    i made a programe in which i want to create and write in excel file using streamreader and streamwriter it works fine when writing a single value
    but when i use a loop to write multiple values in different cells it overwrites all the values in single cell
    how the value is written in different cells using the above method i,e stream writer


    please tell me
    thanks in advance
    varinder
  • Curtis Rutland
    Recognized Expert Specialist
    • Apr 2008
    • 3264

    #2
    I'm pretty sure that you can't write an excel file like that (or at least not easily).

    You could do a CSV file that way fairly easily, and CSVs can be opened by excel.

    The other option is to not use a StreamWriter. Use Interop. This way, you are actually using the excel program to write the file.

    Comment

    Working...