Parsing CSV file issue with FlexCel

I have the following csv file:

OrderNo,OrderDate,PromiseDate,DivisionNo,CustomerNo,SalesorderDate,BillToName,BillToAddress1,BillToAddress2,
16839,1/10/2018,,DIV,CUST,,,,,,,,,,EU Distributor,Viale Della Vittoria,22-33033 Codroipo,,Udine,,,IT,,, ? ?,,,,,,0,0,KMU191,,1872,3.99,CS-12

I'm having trouble parsing when I use the open method: 
    xls.Open(xlsFilename, TFileFormats.Text, ',', 1,1,nil);

seems the Flexcel open method with FileFomat.text is skipping the comma delimitter if the cell value is blank.  for example the 3rd column(PromiseDate) is empty but when I'm accessing the cellvalue I get the next column value: DIV.

Is there any other method with Flexcel to open a CSV file correctly?

Hi,
I can't see this behavior here. I tried with the example here:
http://www.tmssoftware.biz/flexcel/samples/testcsv.zip

Which basically does:


var
  xls: TXlsFile;
  i: integer;
begin
  xls := TXlsFile.Create(true);
  try
     xls.Open('..\..\csv.csv', TFileFormats.Text, ',', 1,1,nil);
     for i := 1 to 10 do
     begin
      WriteLn('Column ', i, ': ', xls.GetStringFromCell(2, i).ToString);
     end;
  finally
    xls.Free;
    Readln;
  end;

end.




And I get this result:
Column 1: 16839
Column 2: 1/10/2018
Column 3:
Column 4: DIV
Column 5: CUST
Column 6:
Column 7:
Column 8:
Column 9:
Column 10:

Could it be that you are using xls.GetCellValueIndexed  instead
of xls.GetCellValue?  GetCellValueIndexed will only return existing
cells, so the cell at the third index is indeed DIV. But GetCellValue
from the third colum should return empty.

Thanks Adrian.  You fixed my issue.

Yes.  I was using GetCellValueIndexed.  
Parsing is working if I use the GetCellValue.