What I do basically is:
Code: Select all
XLSReadWriteII41->Read();
TSheet *Pag0= XLSReadWriteII41->Sheets->Items[0];
// Select desired areas
Pag0->SelectedAreas->Add(2,0,2,999); // C1-C999
Pag0->SelectedAreas->Add(5,0,5,999); // F1-F999
TExportCSVOptions opciones= TExportCSVOptions() << ecoQuotedStrings <<[b] ecoSelection[/b];
const wchar_t SEPARADOR= L';';
const wchar_t COMILLAS= L'"';
Exportcsv4::ExportCSV(XLSReadWriteII41, 0, SEPARADOR, COMILLAS, opciones, outputFile);
I've followed the Delphi code in ExportCSV.pas and it seems correct: it calls two times ExportRange function, once for each selected area and columns and rows are correctly indicated.
Code: Select all
if ecoSelection in Options then begin
for i := 0 to Sheet.SelectedAreas.Count - 1 do
ExportRange(Sheet.SelectedAreas[i].Col1,Sheet.SelectedAreas[i].Row1,Sheet.SelectedAreas[i].Col2,Sheet.SelectedAreas[i].Row2);
end
Empresa Tipo IdOper Concepto Cantidad Importe
1 N 5268748U 95 1,23 1234,5678
1 E 25 96 333,44
Is there something I'm missing or is it related to a bug?
Thank in advance for your help.
Edorta