Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
Importing/exporting to/from fixed text files
Hello,
I'm using TEXT...ENDTEXT command for exporting the content of a table into a fixed txt file, which must have each row, delimited by a line feed and a carriage return or a record separator. The problem is that the first line will come each time empty. What shell I do in order to avoid this and is there a better way to this beside TEXT command? Another problem is that when at the end of the row I insert the record separator <> this one will add one character to the row so there would be a problem if the last field in the row should use the maximum length admitted. Either I will have the last field one character less that is supposed to be or I would exceed the maximum length of the row with one character so that will give me an invalid file.
Any ideas for importing from a fixed txt file, should I use FGETS().
I want to add that each fixed file contains a Header and a Trailer.
Thanks for your help!
Alex
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement