How to disable gridlines in excel sheet using matlab script
이전 댓글 표시
Need to disable gridlines which appear in the excel report generated
답변 (1개)
ES
2017년 7월 3일
You have to use ActiveX
% Create COM object for the current Sheet.
objExcel=actxserver('excel.application');
objExcelW=objExcel.Workbooks;
objExcelF=objExcelW.Open(sExcelFileName));
objExcelS=objExcelF.ActiveSheet;
objExcelS.DisplayGridlines = False
% Delete the COM Object.
objExcelF.Save;
objExcelF.Close;
objExcel.Quit;
objExcel.delete;
댓글 수: 4
kamalakar
2017년 7월 6일
Tyler Goodell
2017년 9월 26일
Yeah same here.
SS585
2018년 9월 6일
This does not work, is there any other solution?
Tyler Merritt
2019년 5월 20일
I was getting the same error, finally found a solution that worked for me.
% Open Excel and make it visible
AppObj = actxserver('Excel.Application');
AppObj.Visible = true;
% Select workbooks
WkbkObj = AppObj.Workbooks;
% Turn off gridlines in active workbook
WkbkObj.Application.ActiveWindow.DisplayGridlines = false;
카테고리
도움말 센터 및 File Exchange에서 Use COM Objects in MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!