PhC
07-19-2004, 04:31 AM
Hello,
I want to start on an office automation project where I will basically let the user export data from my .NET application to an excel file.
I implemented the very helpful tutorial but just added a call to
oApp.GetSaveAsFilename
to let the user choose the filename.
Then when I call the
oWB.SaveAs
subroutine, I get a message if the user chose a filename that already existed, asking whether to overwrite the file yes/no/cancel
This is all perfect, except if the user does not choose yes, I get an Exception that I do not know how to handle (in particular the HRESULT code is the same whether the user chooses no or cancel :confused:
I suppose this is not a very complicated question but I searched the forums and msdn to no avail ...
Thank you for any help!!
I want to start on an office automation project where I will basically let the user export data from my .NET application to an excel file.
I implemented the very helpful tutorial but just added a call to
oApp.GetSaveAsFilename
to let the user choose the filename.
Then when I call the
oWB.SaveAs
subroutine, I get a message if the user chose a filename that already existed, asking whether to overwrite the file yes/no/cancel
This is all perfect, except if the user does not choose yes, I get an Exception that I do not know how to handle (in particular the HRESULT code is the same whether the user chooses no or cancel :confused:
I suppose this is not a very complicated question but I searched the forums and msdn to no avail ...
Thank you for any help!!