Tuto WINDEV 25
400 Part 7: Advanced programming Overview WINDEV allows you to easily handle the most common data formats: • text files (INI, CSV, ...), • XML files, • XLS files, ... Several families of WLanguage functions can be used to read and create these files. This allows you to easily read data generated by another software in your WINDEV applications or to create files that require a specific formatting. Furthermore, several WLanguage functions can be used to handle the directories containing the files. In this chapter, we will focus on: • Text files (text files, INI files and CSV files), • XML files, • XLS files, • the management of directories. Handling text or CSV files Overview The external files are also called text files or files with direct access. In most cases, this type of file contains text but it can also contain binary information such as images, sounds, ... In this lesson as in the entire WINDEV documentation, we will be talking of external files . WINDEV allows you to handle the external files by programming. The WLanguage functions can be used to create, read ... external files. All functions can easily be identified: they all start with the letter "f". The notion of "record" does not necessarily exist in an external file. To handle an external file, you must know its structure, which means how the data is organized inside the file. The CSV files are text files that use a specific structure. Therefore, they can be handled like the text files. The .INI files are also text files that use a specific structure. To handle them, WINDEV includes two specific functions: INIRead and INIWrite . Practical example ▶ Open the unit example named "Handling text files".
Made with FlippingBook
RkJQdWJsaXNoZXIy NDQ0OA==