Hi there,
I am having a few problems with the context to insert the data from an array within delphi into an excel spreadsheet.
I have a couple of snippets of code that I have been playing with from an online tutorial but I can't seem to get them to behave in the way I want .....
The first will create the worksheet and put the first set of an array in but won't allow it to be looped through as the second time around it tries to recreate the sheet:
sCopy := 'SELECT "Harry","Jim","Bill" INTO ["Excel 8.0;Database=' + Edit1.Text + '"].[' + IntToStr(Year) + ']';
The second snippet will append but it has been set up to take the data from an access DB and copy it to a worksheet, I am having probs getting it to use an array as the source of info and loop through that:
sAppend:='INSERT INTO [Sheet2$] IN "' + Edit1.Text + '" "Excel 8.0;" SELECT AuthorEmail, Title, Description FROM Articles';
I realise it is in the context of the query but it appears that delphi works with the ADO in a slightly different way, especially when the data recipient is an excel workbook.
Any help would be greatly appreciated, thanks.
I am having a few problems with the context to insert the data from an array within delphi into an excel spreadsheet.
I have a couple of snippets of code that I have been playing with from an online tutorial but I can't seem to get them to behave in the way I want .....
The first will create the worksheet and put the first set of an array in but won't allow it to be looped through as the second time around it tries to recreate the sheet:
sCopy := 'SELECT "Harry","Jim","Bill" INTO ["Excel 8.0;Database=' + Edit1.Text + '"].[' + IntToStr(Year) + ']';
The second snippet will append but it has been set up to take the data from an access DB and copy it to a worksheet, I am having probs getting it to use an array as the source of info and loop through that:
sAppend:='INSERT INTO [Sheet2$] IN "' + Edit1.Text + '" "Excel 8.0;" SELECT AuthorEmail, Title, Description FROM Articles';
I realise it is in the context of the query but it appears that delphi works with the ADO in a slightly different way, especially when the data recipient is an excel workbook.
Any help would be greatly appreciated, thanks.