AN ERROR WAS RAISED BY METHOD RANGE

Good Mornig Fellow Geeks

My morning is being messep up by this error i get when run this code below actually the code is supposed to populate data into my excel sheet but again i get this error i dont know what it means
IF exp THEN BEGIN

Sheets.Range(‘A’+myJ).Value:=FORMAT(Resource.“No.”);
Sheets.Range(‘B’+myJ).Value:=FORMAT(Resource.Name);
Sheets.Range(‘C’+myJ).Value:=FORMAT(“Res. Ledger Entry”.Description);
Sheets.Range(‘D’+myJ).Value:=FORMAT(“Unit of Measure Code”);
Sheets.Range(‘E’+myJ).Value:=FORMAT(“Res. Ledger Entry”.Quantity);
Sheets.Range(‘F’+myJ).Value:=FORMAT(“Contract No”);
myJ:=INCSTR(myJ);

END;

images.png

Hi,

Why don’t you use standard approach to export data to excel using excel buffer. You can refer standard Report 120 to understand the approach.

Or refer the screenshot 2 , 3 & 5. Don’t comment the code in screenshot 5 as in the image.
saurav-nav.blogspot.in/…/nav-2013-r2-export-to-excel-report.html

Where ExcelBuffer is a temporary variable of table 370.

Let me know how it goes or if you have any issues.