Forum FlexPro – Discuss your topic!

Import Text File content in an Array

Home > Community > Automation and VBA > Import Text File content in an Array

Ansicht von 3 Beiträgen - 1 bis 3 (von insgesamt 3)
  • Autor
    Beiträge
  • #12846
    HerveM1234HerveM1234
    Teilnehmer

    Hi,

    Is there an easy way to import the content of a text file in an array variable.
    The text file contains strings separated by “CR”.

    Thanks

    RV

    #8506
    HerveM1234HerveM1234
    Teilnehmer

    Hi,

    Is there an easy way to import the content of a text file in an array variable.
    The text file contains strings separated by “CR”.

    Thanks

    RV

    #9342
    Bernhard KantzBernhard Kantz
    Teilnehmer

    Reading text file via VBA is no FlexPro Automation specific topic. But you can read such a file using a FPScript formula like

    ReadTextFile("D:\\tmp\\example.txt", 0n, 0n, 1n, 1n, FALSE, TYPE_STRING, TRUE, "\n", FALSE)
    

    This expression generates a dataset of strings, each entry representing a line in the text read.

Ansicht von 3 Beiträgen - 1 bis 3 (von insgesamt 3)
  • Du musst angemeldet sein, um auf dieses Thema antworten zu können.