Advertisement
Guest User

Untitled

a guest
Sep 15th, 2014
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. FileStream ostrm;
  2. StreamWriter strm;
  3. TextWriter txtWrt = Console.Out;
  4. ostrm = new FileStream(path + "\Output.xls", FileMode.Truncate, FileAccess.Write);
  5.  
  6. public Excel.Application app = null;
  7. public Excel.Workbook workBook = null;
  8. public Excel.Worksheet workSheet = null;
  9. app = new Excel.Application();
  10. workBook = app.Workbooks.Add();
  11. workSheet = (Worksheet)workBook.Worksheets.get_Item(1);
  12. workBook.SaveAs(path+ "\Output.xls");
  13. workBook.Close();
  14. app.Quit();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement