|
Hi,
This is how I am opening an excel spreadsheet.
But when it is opened, I do not see the addins
Is there a parameter to set to leave the addins as it is?
Microsoft.Office.Interop.Excel.Application EApp = new Microsoft.Office.Interop.Excel.Application();
Microsoft.Office.Interop.Excel.Worksheet WS = ((Microsoft.Office.Interop.Excel.Worksheet)(EApp.Workbooks.Open(@"C:\Data.xls",
Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing).ActiveSheet));
EApp.Visible = true;
|
|
|
|
|
Hi
I have to read all the link lines in HTML file. If the links path is not already there, then append link. I have done like below but I could not append the link if I use my code.
StreamReader sr = File.OpenText(navigationFile);
String line = sr.ReadToEnd();
if (!(line.IndexOf(pubPath) > 1))
{
sr.Close();
using (StreamWriter sw = File.AppendText(navigationFile))
{
sw.WriteLine("
");
sw.WriteLine("");
sw.WriteLine(pubTitle);
sw.WriteLine("");
sw.Close();
}
Does any one have Idea about it.
thanks.
|
|
|
|
|
Are any changes being appended to the file? Are any exceptions being thrown?
From your code, you are appending pubTitle, not pubPath (which is the one you are searching for).
Also, you should probably use the String.Contains[^] method. Like so:
if (!line.Contains(pubPath)) {
}
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
Hi Tom,
thank you very much for your reply. I missed the anchor tags before and after the pubtitle while uploading the post. I have looked for Contains(), I dont have Contains() for String.
Is there any other way.
|
|
|
|
|
Are you using .Net 1.x? Contains is supported in .NET Framework 3.5, 3.0 SP1, 3.0, 2.0 SP1, 2.0.
But you can use String.IndexOf[^], like you had before. But you should be checking for -1, because 0 and all positive integers indicates that it found the string.
if (-1 == line.IndexOf(pubPath)) {
}
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
I am using in .net compact framwork 2.0.
|
|
|
|
|
I am attempting to write a new class, System.UInt128, and to do so I am trying to get the carry-out information for arithmetic operations such as long +/- long (1 bit carry), and long * long (long carry). Is there any way to get this information from within C#? (and for those of you who will suggest that I just use decimal, I cannot do so because I need 128 significant bits, and decimal only offers 96). Thanks,
Sounds like somebody's got a case of the Mondays
-Jeff
|
|
|
|
|
Check this[^] out.
I'm not sure if there is a download link for the source, but it appears to all be in the article (so you can piece it together). You can probably get it directly from the author also.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
Thanks.
Sounds like somebody's got a case of the Mondays
-Jeff
|
|
|
|
|
The J# dll has the BigInteger class.
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|
|
|
Check this[^] out. It should get you started.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
thanks,
it is interesting.
but have you also some sample with explicit lines between lists ?
lines may be not horisontal, what is common practice.
|
|
|
|
|
I'm afraid not. You will have to modify the drawing code to include the lines yourself.
There are some commerical versions also (here[^] is one).
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
thanks.
I would probably use and extend proposed controls...
It is some pity, that I was seen such controls but can not find it now...
It was probably some kind of Splitter.
|
|
|
|
|
Hello to All,
Please help me to find out what type of code required for Displaying Word document in my aspx page.
Thanking to all in advance.
BHAVESH PATEL
|
|
|
|
|
I'll assume you mean to display the contents, rather than a simple link to the document.
FileStream stream = File.Open( Server.MapPath(myFile), Open );
Response.Clear();
Response.WriteFile(stream);
Response.End();
only two letters away from being an asset
|
|
|
|
|
Hi,
I am installing the next version of my .net 2.0 winform application.
A message is displayed when going through the install on a machine.
It says:
Microsoft.vbe.Interop vesion 11.0.0.0 should be installed in GAC.
How and where do I get this dll from to place in the references?
I guess, then I will have to publish again.
Thanks
|
|
|
|
|
Check this[^] out.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
|
Hi All,
When a windows service is installed, the app.config file is not copied to the installed location, but I have some data in that.
Can any one tell me how to get the app.config file in the installed location of windows service.
Thanks a lot in advance.
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
How are you installing your Windows service?
Using the Visual Studio Setup project, the app.config is considered part of the "Primary Output" of the WinForm/Console application project.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
I have 10 different classes in an application. I need to access a constant (int value = 125;) in all ten classes.
Which is better way of following two options?
1. Declaring int value = 125; in all classes
or
2. creating static class
public static class Constants
{
public static int value = 125;
}
using it as Constants.value in all classes.
Any other best option?
Thank you in advance..
|
|
|
|
|
If you put it in a static class, this is accessible to all other classes, not just your ten classes. Putting it in each class is a maintenance nightmare - if you add an 11th class, you have to remember to add the int. If the int changes, you have to change it in all places.
Do the classes all derive from a base class? If so, put it there and make it protected .
We violated nature and our children have to pay the penalty
Don't go near the water children... Johnny Cash - 1974
|
|
|
|
|