Saving data from a StringGrid to a text file like this.
FILE *fop=fopen(SaveDialog1->FileName.c_str(),"wt"); if(fop) { if(nt->RowCount>0) fprintf(fop,nt->Rows[0]->CommaText.c_str()); for(int i=1;i<nt->RowCount;i++) fprintf(fop,"\n%s",nt->Rows[i]->CommaText.c_str()); fclose(fop); }
nt is a StringGrid How to read from a file using OpenDialog?