Loading AxSpreadsheet from a .NET resource

P

Paul Hasell

Hi,

I'd like to be able to include my Excel templates (XML files) as resources
in the assembly rather than separate files only I can't find a method of
loading these into the AxSpreadsheet. The XMLUrl property on accepts URL's
not strings so the only way I can think of is to extract the resource, save
to a temprary file, load and then delete the temporary file. I'd like to find
a more elegant solution if I can. Any ideas anyine?
 
P

Paul Hasell

Peter,

Thanks, I had hoped I might be able to load the resource directly into the
AxSpreadsheet but this is a useable solution.
 
P

Paul Hasell

Peter,

Rather than use the root of C: (which is locked down under group policy) I'm
trying to use the Isolated Storage directory hive. However, although I can
create the file I can't get a fully resolved path to it!! Any ideas?
 
P

Peter Huang [MSFT]

Hi

IsolatedStorage's concrete file path is controled by .NET framework, we
should always use IsolatedStorage's method to write/read the data.
Usually it is in the directory below.
C:\Documents and Settings\v-phuang\Local Settings\Application
Data\IsolatedStorage
e.g. You will find it is not predictable.
C:\Documents and Settings\v-phuang\Local Settings\Application
Data\IsolatedStorage\3tc5ggky.5gr\dmwbcbtm.f2w\Url.kddvnk2rsg3bfnvnoazlcymom
ubiim5q

You can use the Isolated Storage Tool (Storeadm.exe) utility to list and
remove the Isolated Storage files that are created with this console
application.

IsolatedStorageFile Class
Represents an isolated storage area containing files and directories.

Here is some code about how to read and write to files with
IsolatedStorageFileStream
Reading and Writing to Files
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm
l/cpconreadingwritingtofiles.asp

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top