How to disable gridlines in excel sheet using matlab script
Mostra commenti meno recenti
Need to disable gridlines which appear in the excel report generated
Risposte (1)
ES
il 3 Lug 2017
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 Commenti
kamalakar
il 6 Lug 2017
Tyler Goodell
il 26 Set 2017
Yeah same here.
SS585
il 6 Set 2018
This does not work, is there any other solution?
Tyler Merritt
il 20 Mag 2019
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;
Categorie
Scopri di più su Use COM Objects in MATLAB in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!