Hi,
Is there anyone here who already encounter this kind of error in exporting to excel in NAV2013?
I'm encountering this error when I tried to run my customized report for BIRForm2307 to Update an excel worksheet. I've tried to debug it and it stops at the code recExcelBuffer.CloseBook;
Kindly help me please on how to fix this issue, it almost 1 week since I've been trying to solve this bug. ](*,)
1. Code that runs the excel buffer. The error prompts on the third line below
recExcelBuffer.UpdateBook(txt2307TemplatePath,SheetName);
recExcelBuffer.WriteSheet('',COMPANYNAME,USERID);
recExcelBuffer.CloseBook;
recExcelBuffer.OverwriteAndOpenExistingExcel(txt2307TemplatePath);
recExcelBuffer.GiveUserControl;
2. CloseBook Fuction
IF NOT ISNULL(XlWrkBkWriter) THEN BEGIN
XlWrkBkWriter.ValidateDocument;
XlWrkBkWriter.Close;
CLEAR(XlWrkShtWriter);
CLEAR(XlWrkBkWriter);
END;
IF NOT ISNULL(XlWrkBkReader) THEN BEGIN
CLEAR(XlWrkShtReader);
CLEAR(XlWrkBkReader);
END;
Your suggestions and comments will much appreciated. [-o<
Thanks,
Donna
0
Answers
I guess there is some non-printable character somewhere which causes the problem, you can find it out with a loop such as:
thanks for that.
I already resolved the bug, you're right that its from the function I used to populate data in Excel.
The error occurs in the field that does not have any value where it is pass to a function that needs to be separated by cell.
Whew. \:D/
Thanks again.
Donna