|
Hello ,
I am writting an application in which I need to find details about excel files. One of the properties I am after is the owner property of the excel file, this should be the one that you can see when you right click the excel file and choose proerties, then go to Details Tab, under File's section, there will be owner name.
How can I get handle on this name at run time using Microsoft.Office.Interop.Excel, i think it should be as simple as finding a creator of the file by using Microsoft.Office.Interop.Excel.Application.Creator but there is not such property like owner.
Can somebody help me with this.
Thanks in advance.
happy coding!
|
|
|
|
|
Hi,
I have values in my database that have quotes e.g Spanner 2",Tyre 12"
I am working on escaping them so that the output to a CSV file is legible.
Currently I have
data = data.Replace("\"","\\\"");
Which is not working because the \" is not there. Instead I have " without the slash. How can I escape them ?
Let's do this !
|
|
|
|
|
Hello,
You may replace the " char to any other char, like this
data = data.Replace('"','\');
if you want to replace "(quote) to a string then you have to replace with a special character as above then u can replece that special char (as String) to any string.
data = data.Replace('"','`'); // replacing old char to new char
data = data.Replace("`","\\\"); // replaceing old String to new String
It think u can solve your problem..
Best of Luck.
Dipak
|
|
|
|
|
That should work. I just tried:
string s = "12\" tire" ;
System.Console.WriteLine ( s ) ;
s = "\"" + s.Replace ( "\"" , "\\\"" ) + "\"" ;
System.Console.WriteLine ( s ) ;
And got
12" tire
"12\" tire"
as expected.
It's possible that the " character is not actually a " character, it could be some other Unicode character.
(It could be Double Prime ″ Unicode 2033 for example.)
|
|
|
|
|
Say I have a class like,
class Sample
{
public decimal first = 10;
public decimal second = 20;
} I have initialized it
Sample sample = new Sample(); Now how do I calculate the space required for this instance ? I have calculated in the following way,
decimal takes 12 bytes. Here we have two decimals, hence 24 bytes. And the variable sample , I believe it takes 4bytes. So total it is 28bytes. Is this the right way to calculate size utilized ?
|
|
|
|
|
Its a bit more complex. The variable sample is taking up stack space (and I believe theres more than just a 32bit pointer - I'm too lazy to read the docs atm).
The instance is stored on the heap, but again theres probably overhead on top of those 24 bytes.
If memory usage is an issue in your app I suggest you run a profiler over it. I think Redgate advertises here, otherwise the one from Jetbrains is an acceptable alternative.
|
|
|
|
|
Thanks for looking into this. Actaully I am on a pocket PC which has very less amount of memory. I checked with .NET profiler, but it looks very hard to find the required information as it is flooded with many instances.
Do you have any URL's which gives light into this ?
|
|
|
|
|
WinDbg with the SOS extension can do this, I do not know if it work on Pocket PC though. (sorry cant recall the command)
|
|
|
|
|
Thanks. I will take a look. BTW, do you have any idea about my original question ?
|
|
|
|
|
I think the GC class exposes a bunch of profiling metrics that might be worth looking into.
|
|
|
|
|
N a v a n e e t h wrote: decimal takes 12 bytes. Here we have two decimals, hence 24 bytes. And the variable sample, I believe it takes 4bytes
The size of the pointer (reference) is not included. In this case, there is a pointer, but for a struct, there would not be.
|
|
|
|
|
This question is related to MS Visual Studio 2005 in particular but please bear with me.
If I create a new project, let's say MyProject , Visual Studio creates a folder with the name MyProject for the solution which in turn contains a subfolder with the same name for the project. It also creates all the neccessary files and forms using that name.
Now, let's say I want to change the name of the entire solution to RealName . I can change the name of the project and even the solution, I can change the default namespace and everything. The only thing that I don't know how to change is the directories as described above.
Is there anything that I need to know in order to change the folder names so that it looks as if I named the project RealName from the very beginning?
|
|
|
|
|
Rename the folders in the file system. If the solution can't find the projects as a result, remove and readd them.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
Doh! That was too easy. Thanks.
|
|
|
|
|
Hi,
I created an application that plays sound files with Windows Media Player. I need to find so examples on how to read the amplitude and pitch of the media being played. Can someone show me some examples or give me some helpful links please?
Thanks
|
|
|
|
|
You'll be looking for libraries to perform a fast fourier transform.
|
|
|
|
|
Any reference to any of the libraries please?
|
|
|
|
|
Thats more of a question for google. I don't know any managed ones off the top of my head.
|
|
|
|
|
|
Can anybody point me to a good link concerning custome project templates?
I would like to create a sort of wizard that let's you choose a couple of options and creates a project with references to custom dll's accordingly.
(I tried googling, but without any descent keywords it's hard to find anything usefull)
thanks.
|
|
|
|
|
|
Hello everyone:
I want to call MS Picture Manager to view some pictures and do some actions(e.g.
go forward and go back) in my application,but i cann't find any com object about MS
picture manager like PPT.
Help me, thanks~
|
|
|
|
|
I doubt one exists. There's sure no rule that says one has to.
Why not just show the images yourself ? It's kind of trivial.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
hi,
i know this is very trivial, but it's the request from my client. so i must do my best to try it.
thanks for your attention
|
|
|
|
|
Why does your client want the picture manager to view it ?
Athrun.Du wrote: so i must do my best to try it.
You will soon learn that part of your job is to educate ignorant clients on what is and is not possible. Offer an alternative ( that you'll write something to show a slide show ). I doubt they want the picture manager for any special reason, they just assume that that's the obvious way to get what they want.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|