Excel buffer clearcontents

lzrlzr Member Posts: 264
Hi all,

I had a function in Excel buffer in NAV 2009 which cleared part of an Excel sheet but that doesn't seem to work in NAV 2017. Can anyone help me find a function that works in NAV 2017?

Old code:
ClearSheet(StartCell : Text[10];EndCell : Text[10])
XlWrkSht.Range(StartCell + ':' + EndCell).ClearContents;

New code (which doesn't work either)
ClearSheet(Sheetname : Text[100];StartCell : Text[10];EndCell : Text[10])
XlWrkSht := XlWrkBk.Worksheets.Item(Sheetname);
XlWrkSht.Range(StartCell + ':' + EndCell).clear;
Navision developer
Sign In or Register to comment.