I have an issue, where I need to put a single quote ' into C/AL, but not have it read as a close/start of a string.
I am exporting a report to excel with the excel buffer. All I need to do is enter a formula of a cell to reference another one. the problem is that the other cell I need to reference is on another sheet. So in excel the formula of the cell needs to be:
='AUC00232'!G35
(AUC00232 is the name of the other sheet).
So Excell needs the ' in the start and end of the sheet name, but NAV reads it as the first one as the start of a string and it throws the error below when trying to compile:
')' should come here.
Below is the code I am using. I was sure I read perhaps on Mibuso I could use to single quotes ('') and NAV would treat that as one. Could someone refresh my memory on how to do this as darned if I can find it from searching the forum..
xlsInsertCell(xRow,xCol,TmpStr := '=''' + Customer."No." = '''!' + LcyTotCell,TRUE,FALSE,FALSE,'','');
0
Comments
Try this
Many thanks for answering my trivial question. You are of course correct.
What I needed was in total 3 quotes:
xlsInsertCell(xRow,xCol,'=''' + FORMAT(Customer."No.") + '''!' + LcyTotCell,TRUE,FALSE,FALSE,'','');
Bruce Anderson
u replace the the single quote(')
with ('').
More about....handling single quotes
Antonio