geetachauhan15
New Member
- Joined
- Jun 16, 2015
- Messages
- 1
oRng.set_Value(misValue, outputArray);
xlApp.Visible = true;
xlApp.UserControl = true;
oRng = xlWorkSheet.Range[xlWorkSheet.Cells[1, 1], xlWorkSheet.Cells[1, 16]];
oRng.EntireColumn.AutoFit();
oRng.EntireRow.Font.Bold = true;
oRng.Interior.Color = Excel.XlRgbColor.rgbDarkBlue;
oRng.Font.Color = Excel.XlRgbColor.rgbWhite;
Microsoft.Office.Interop.Excel.Borders border = oRng.Borders;
border.LineStyle = Microsoft.Office.Interop.Excel.XlLineStyle.xlContinuous;
border.Weight = 2d;
oRng.Cells.VerticalAlignment = Microsoft.Office.Interop.Excel.XlVAlign.xlVAlignTop;
oRng.Cells.HorizontalAlignment = Microsoft.Office.Interop.Excel.XlHAlign.xlHAlignLeft;
xlWorkBook.SaveAs("D:\\GFAutomation.xls", Excel.XlFileFormat.xlWorkbookNormal, misValue, misValue, misValue, misValue, Excel.XlSaveAsAccessMode.xlExclusive, misValue, misValue, misValue, misValue, misValue);
xlWorkBook.Close(true, misValue, misValue);
xlApp.Quit();
i m using below code but the Top & left alignmet is not working, i dont kw what m missing here
xlApp.Visible = true;
xlApp.UserControl = true;
oRng = xlWorkSheet.Range[xlWorkSheet.Cells[1, 1], xlWorkSheet.Cells[1, 16]];
oRng.EntireColumn.AutoFit();
oRng.EntireRow.Font.Bold = true;
oRng.Interior.Color = Excel.XlRgbColor.rgbDarkBlue;
oRng.Font.Color = Excel.XlRgbColor.rgbWhite;
Microsoft.Office.Interop.Excel.Borders border = oRng.Borders;
border.LineStyle = Microsoft.Office.Interop.Excel.XlLineStyle.xlContinuous;
border.Weight = 2d;
oRng.Cells.VerticalAlignment = Microsoft.Office.Interop.Excel.XlVAlign.xlVAlignTop;
oRng.Cells.HorizontalAlignment = Microsoft.Office.Interop.Excel.XlHAlign.xlHAlignLeft;
xlWorkBook.SaveAs("D:\\GFAutomation.xls", Excel.XlFileFormat.xlWorkbookNormal, misValue, misValue, misValue, misValue, Excel.XlSaveAsAccessMode.xlExclusive, misValue, misValue, misValue, misValue, misValue);
xlWorkBook.Close(true, misValue, misValue);
xlApp.Quit();
i m using below code but the Top & left alignmet is not working, i dont kw what m missing here