How to use TextToColumns in excel?


2006-11-03 03:49:23 PM
delphi45
Hello people,
Quote
From Excel I am using the DecimalSeparator in my application to generate
a new file. That works fine on Excel 2003 but not in earlier versions.
After some googling I saw the TextToColumns method migth give the
answer for getting the same results if Excel 2000 is installed. But for
some reason I can not get it implemented.
Can anybody help me with this and also tell me how to detect which
version of excell is installed?
Here's some code which doesn't work, it raises a parse error on the
TextToColumns method.
aExcellApp.Workbooks[1].WorkSheets[1].Cells[10,10].Select;
aExcellApp.Selection.TextToColumns.Destination(aExcellApp.Workbooks[1].WorkSheets[1].Cells[10,10],
DataType := xlDelimited);
Thanks in advance.
Paul