Hi experts;
I ahave a excell sheet. for trying the code i set the path like
objWrkBk = GetObject("C:\ABC.XLS")
Now i want that when i publish the project include this XLS file.
I copy the file in resources folder and give path as
objWrkBk = GetObject("/Resources/abc.XLS")
But exception occur.
Where i include the file which becomes the part of the application?
PLz guide me
Thanks
What's the exception? I'm going to assume it's a file not found but I could be wrong. I'm also going to suggest you look into using Application.StartupPath() and IO.Path.Combine().
Yes i try and read ur link;
The startup path is as follow
c:\Hamad'documents\visualsudio2008\project\gas turb calc\bin\debug
but when i publish or make exe for i want to include that excell file with it.
User may be install the project in D drive then?
Thats why i want to understand where i put the excell file which include at the time of publishing/exe and when user install it works without any error.
Thanks for help
Regards
Hi;
when i write as
C:\Documents and Settings\Hamad Sultan\My Documents\abc.xls
then no exception occur.
Plz help me i can not understand how i fix it?
Regards