This is the problem because when I use my antivirus deletes it at the time, my question to other alternatives I have to read a text file without using Classes. Readfile(hFile, datafile, BUFF_SIZE, dwread, nil) SetFilePointer(hFile, 0, nil, FILE_BEGIN) HFile := CreateFile(PChar(archivoaleer), GENERIC_READ,įILE_SHARE_READ or FILE_SHARE_WRITE, nil, OPEN_EXISTING, function leerarchivo3(archivoaleer: string): string ĭatafile: array of ansichar The simplest and most obvious way to create a file in CSV format from Delphi application is just to iterate over cells in a StringGrid, write their contents to a file and. ![]() This format is textual and designed to provide tabular data. ![]() ![]() Īlso I have this : function leerarchivo(filealeer: string): string įinaldearchivo := finaldearchivo + lineasleyendo CSV files (comma-separated values) are special types of files that you can create, read and edit in Excel. This goes to perfection but do not want to use the component Classes for the program does not weigh much. ![]() Tengos two codes one is this : function LeerArchivox(const filename: TFileName): String begin var A,B: TStringList X: Integer begin A:TStringList.Create Try B:TSringList.Create Try A.LoadFromFile ('myFile.csv') for x : 0 to A.Count-1 do begin B.Text : A X // need to decode B. Hi I am having a problem running a function to read a text file the problem seems to be that my antivirus blocks my delphi console program because when I do for a visual form there is no problem. locate the comma delimiter separating each field and then use copy to do all this but there must surley be a much simpler way.
0 Comments
Leave a Reply. |