Gridlines in excel through interop

后端 未结 5 521
滥情空心
滥情空心 2021-01-18 06:54

Any idea where the setting is hiding for turning gridlines off while using excel 2003 from interop?

5条回答
  •  执笔经年
    2021-01-18 07:28

    Currently, using VS2012 and I did it as follows:

    Excel.Application oXl = new Excel.Application();
    
    oXl.Visible = false; // true for debug
    
    Excel.Workbook wb = oXl.Workbooks.Add();
    Excel.Worksheet ws = wb.Worksheets[1];
    
    oXL.ActiveWindow.DisplayGridlines = false; //true is the default in Excel
    

提交回复
热议问题