Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is there a way to tell a binary from a text file?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00464420
Message ID:
00464813
Vues:
27
>Is there a way to read a file type? i.e if I expect to receive coma delimited files and get a spreadsheet instead, is there anyway to tell?

If you know something about the ascii file, you make a quick check.

For example, if you know there is a comma delimited with 6 fields per record, you can just read the first line and look if it has 5 commas. It is not a bulletproof method, but it's a start.

Also, you can try to find some pattern in the first bytes of an Excell spreadsheet, although except that you find some documentation stating that this is standard, I'll use this with care. It can work just for some type of spreadsheet, an speceific version, etc. It all depends on the level of research you have time to do.

Hope this helps.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform