Hey there,
i need to work with MS Excel within delphi!
i've found out how to open excel, open a new workbook/worksheet
i can also add data to the workbook and in other ways manipulate the cells etc.
something like:
var
OleApplication : Variant;
begin
OleApplication := CreateOleObject('Excel.App
lication')
;
OleWorkBook := OleApplication.Workbooks.o
pen('c:\te
mp\excel.x
ls');
..
..
..
end;
what i need is to be able to open a comma seperated file (.csv)!
not as a new workbook/worksheet, but open it into an existing (already open) workbook..
eg. i have a file with some headers/headlines in row 1. then i want to get the data from another file (the .csv file) into the same woorkbook!
if i open the .csv with the "open" procedure it will open as a new workbook/sheet..
i need to do the same as you do, when you in Excel choose "import data from textfile"..
i've seen somthing about a .opentext procedure which takes a lot of parameters, but i cant get it working..
anyone ?
/HMann
Start Free Trial