Fixed lenght field Text file import

Alessandro_ZappiaAlessandro_Zappia Member Posts: 2
edited 2006-01-25 in Dynamics AX
Hi everybody! I'd like to create a method to import a text file into a
table. The fields in this file has different types of data (int, real,
string) and are fixed lenght, with no separators char between the
fields. It doesn't seem possible using the read method of an IO class
(AsciiIO or BinaryIO, and so on..). Am I wrong? Any suggestions?

Thank you very very much!

Comments

  • HarishHarish Member Posts: 172
    Hi,

    It would be easier if there are indicators between fields - any special character would do.

    To get inspiration probably you might want to refer this -

    http://www.harishm.com/Navision/Code.html

    Hope this helps and good luck with your import :),

    Harish Mohanbabu
    Harish Mohanbabu
    Long way to go before I sleep..
  • gameovergameover Member Posts: 4
    thanks to the code, it's useful to me
  • kgauravkgaurav Member Posts: 32
    Hi All,

    I belive the issue of Alessandro is still to be addresed, like he is telling that he doesn't have any field seperator so there is a work around. Imoport the text filed as on text field and than as the field length is going to be fixed so through string manipulation functions we can identify the various data's.

    I belive this is a good way to address a string problem as axapta has very nice string manipulation functions.

    Bye

    Kgaurav =D>
Sign In or Register to comment.