I have a sample.txt file containing some text:
MTV0K-HMBRV-XC813-BPY1Q-8A8PS-PRN5M
2HCZN-7NCMA-ROFUF-AH34T-QRPCL-0NO6F
CBFVC-VWQL1-7DK8D-O48DM-14JLP-ISNSS
MPV18-WK7HZ-2AUIL-JH5UV-H4O9P-102PI
HN8US-E16BY-OKSJN-0J02E-BGDUQ-WV6AV
GSXIP-GIA1X-KFY0N-EO90L-4RGQA-HAJHM
QWTSA-EAX1Q-HENLG-53AB3-7JU9K-8AWFI
Create new VCL forms application and put TAdvStringGrid (SG1) and TButton (Button1) on it:
void __fastcall TForm1::Button1Click(TObject *Sender)
{
int i, j;
SG1->SaveFixedCells = false;
SG1->ColCount = 2;
SG1->RowCount = 2;
SG1->LoadFromCSV("c:\sample.txt");
for(i = 1; i <= SG1->ColCount; i++)
SG1->Cells[0] = UnicodeString(char('A' + i - 1)) + "<P align="center"></P>";
for(i = 1; i <= SG1->RowCount; i++)
SG1->Cells[0] = UnicodeString(i) + "<P align="center"></P>";
for(i = 1; i <= SG1->ColCount; i++)
for(j = 1; j <= SG1->RowCount; j++)
SG1->Cells[j] = SG1->Cells[j] + "<P align="center"></P>";
}
When platform is 32 bit I get the correct import:
If I switch platform to 64 bit windows and run it then I get the following: