Remove Excel CR+LF Errors

AdministratorAdministrator Member, Moderator, Administrator Posts: 2,500
edited 2010-01-06 in Download section
Remove Excel CR+LF Errors
Scans all Code and Textfields of your database in every company.
In this Ready-to-use version also the writeprotected Ledgertables 17,21,25,32,379,380,5802 (permissions set to Modify allowed).

The CU automatic skips tables you haven't rights to read or write.

It checks every field for containing one ore more codes of 00 0D 0A.
If found, the codes whill be removed from the field, and the record is stored (only in this case). You can search for all (forbiden) chars you want, just change the String ForbiddenChars.

You get this codes (0D 0A) if you copy and paste a cell from Excel (all versions) in a text- or codefield of Navision (all Versions).

This CU uses the RecordRef and Fieldref, so it will run only from Navision 3.70 up.
It is written in 4 SP3HF69, but should be importable to any version from 4 up, maybe also on 3.70.

You can run this CU in Automationmodus (guiallowed).
If you want to change the tables to scan, you need
-to remove all permissions if you don't have AL-Licence
-change the "CheckThisTable" as you want. Some Examples are included.

There might be more to done, e.g.
-use a record filled in the ChangeLog, so only wrong Entries are to scan and to correct
-use a Table or Form to configure the Tables to check
-....

As usual: Use at your own risk, test it befor real-use in a test-enviroment, check the results, love your mom and Dad, and leave the first line of this documentation. Feel free to copy, modify and upload this CU to any sources/HP you want.

http://www.mibuso.com/dlinfo.asp?FileID=1011

Discuss this download here.

Comments

  • Dave_beDave_be Member Posts: 35
    First of all thanks for this piece of code.
    When i try to run the codeunit i got the following error (translated from dutch)
    The variable RECORDEF is not closed. Please close the variable RECORDREF with CLOSE before opening a new table.
    Version is 5.0 SP1
  • rthswrthsw Member Posts: 73
    Ups, excuse this late answer, just read your comment.

    In Before-5 Versions Navi closed the RecRefTable autoamticaly before re-open an new one.

    just change this lines (fix will also work in "older" Navisions)

    END;
    UNTIL Companys.NEXT = 0;

    to

    END;
    RecordRefTable.CLOSE;
    UNTIL Companys.NEXT = 0;
Sign In or Register to comment.