PrintPreview Window in C#
- by M.Thillai
Hello Techies,
In my windows application in .net, i need to have Print Preview option for an excel file. The followings are my codings.
//Excel.Application excelApp = new Excel.Application();
Excel.Workbook wb = excelApp.Workbooks.Open(@"C:\\Documents and Settings \\Admin \\Desktop \\DoCoMo\\ news5.xls",
Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing, Type.Missing);
Excel.Worksheet ws = (Excel.Worksheet)wb.Worksheets[1];
ws.PrintPreview(Type.Missing);
The compilation is successful. but i didn't get the print preview window. Is there any requirement of additional parameters or any other. I don't know how to achieve it . Please Guide me.I will be so great full to Our "Techies" for this Timely help.
From,
M.Thillai