Questions

Answer for:

Link to a resource excel file from a button

Message 5 of 5

View entire thread
+
0 Votes
Tony Hopkinson

If you add the file as a resource, it's compiled into the exe, it get's treated like a string resource or a button image...

Youn need to add your file as a new item to a project, and then set the copy to output directory property to copy allways or copy if newer. (Just like you'd do with a 3rd party dll) Build Action should be Content.

Then when you build it will get pushed into Degbug/bin.

If you compile the file in as a resource. Then to launch excel for it you are looking at loading the resource to a stream, saving it to a temporary file (Sytem.IO.Path.GetTempFileName) and then launching excel for that.

Hths