Thanks Eddie, You beat me by a minute! Ian
SQL writing to Excel
so I need to do this:
include (windows.ins) character*256 csvfile csvfile='mycsv.csv' open(unit=10,file=csvfile,status='unknown') write(10,1000) 1000 format(''Hello there',1.0,2.5,3.1415926') close(unit=10) call use_url@(csvfile) end
I do of course need to have my version of mycsv.csv in the directory I take it!!!
If this is correct I ran that it compiled and ran and just brought the dos screen and sat there!
I didn't know about use_url@, but I have used START_PPROCESS@ with some success. This works (for Excel in Office 2007, Office 2003 is in the folder .... Office11 ....):
include <windows.ins>
character*256 csvfile
csvfile='mycsv.csv'
open(unit=10,file=csvfile,status='unknown')
write(10,1000)
1000 format(''Hello there',1.0,2.5,3.1415926')
close(unit=10)
C call use_url@(csvfile)
IA = START_PPROCESS@('C:\\Program Files\\Microsoft Office\'//
& 'Office12\\Excel.EXE',csvfile)
end
Eddie
Apologies Ian your prog does work it does write to the CSV its just that the black screen did not tell me !!! I should realise it wont unless you give some end message...thanks anyway.
But really this is doing no more than opening a file and writing to it in the normal Fortran fashion as I have been doing as I originally wrote is it not...
No what I want to do is write to an Excel worksheet which I did partly manage using SQL but it did seem limited at least using the prog examples supplied via F90SQL webpage EXCELWRITE, EXCELUPDATE examples the first kept moving on down the page and writing fresh data, the other update one seems restricted to only a few records...could not modifiy either to work....