|
|
Hi,
I have an requirement to read the data from excel sheets. Excel work book contains 5 sheets. Each day I have to read 5 different sheets. How should I code so as to read a particular sheet on each day(for eg: Monday - Sheet1; Tuesday - Sheet 2 like that). And also I need only to read the values from one colum, say column C.
Also, there are chances the sheets gets updated by the users often. So can I read the data eventhough the file is open?
Any help in this regard will be great. Please provide the code, if possible.
The application is in C# and I'm using VS.Net 1.1
Meeram395
|
|
|
|
|
|
Hi,
Thank you for your efforts and timings. I can use this component in one of my other application.
But, in this application, the no.of rows may exceed 150. It will be upto 15000 max and also the sheets are likely to increase by one or two. So how should I handle in such a case? Is there anyway like Sheets.Find and giving the worksheet name?
Thanks for all your help.
Meeram395
|
|
|
|
|
If I was you..
Use ODBC via ADO.. then its just like accessing a .net dataset.
Sk8tZ
|
|
|
|
|
Hi.
I'm developing a client for a web service which requires SSL authentication(via https).
Normally certificates are installed manually by the the user. But I am assuming that many different users with many different certificates will use the same computer and I don't want to have all the certificates installed at a given time for security reasons.
What I want to do is to implement a mechanism so that the certificate used for authentication can be installed before the web method call and uninstalled afterwards. So I've written a couple methods to do this.
The problem is that the InstallCert method does not install the certificate, but the UninstallCert methods does what's supposed to do, assuming that the certificate in subject has previously been installed in the store(for now I do that manually).
Any clues?
Thanks a lot.
Relevant code below.
X509Store store_Personal = new X509Store(StoreLocation.CurrentUser);<br />
<br />
private void InstallCert(X509Certificate2 theCert)<br />
{<br />
store_Personal.Open(OpenFlags.ReadWrite);<br />
store_Personal.Add(theCert);<br />
store_Personal.Close();<br />
}<br />
<br />
private void UnistallCert(X509Certificate2 theCert)<br />
{<br />
store_Personal.Open(OpenFlags.ReadWrite);<br />
store_Personal.Remove(theCert);<br />
store_Personal.Close();<br />
}
|
|
|
|
|
Low activity on Monday it seems...
I found a way to make it work but I still don't understand why it didn't work in the first place. It's totally unlikely to be a bug, but it seems that way.
So, instead of adding the single certificate to the certificate store, I add a collection of certificates(which only holds one certificate) using the AddRange() method of the X509Store object. And it works.
If you are really really bored and have nothing else better to do you might as well try it. It's just a few lines of code.
Have a nice day!
|
|
|
|
|
hi All,
I am having an application which i wanna select tabs when user clicks on the relevant node.
eg:
Tree View: Tab Page
Main(root)
...Tab1(child)_____tabPage1(Get Slected)
...Tab2(child)_____tabPage2(Get Slected)
...Tab3(child)_____tabPage3(Get Slected)
some thing like that.
I got no idea how o do.
Please help me.
Regards
Ruwandi
rkherath
|
|
|
|
|
Dear Used Thsi Event of Tree View Control
private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
{
textBox1.Text = e.Node.Text;
}
|
|
|
|
|
Hey, I was wondering if there is anyway of binding data from multiple
tables to ONE Binding Navigator. Or if i can bind the results of a query to it?
Phoenix
|
|
|
|
|
i think you can create a quiry-->fill it to a dataset and bind the data set to the control
im not much clear of what you require. but hope this will help
Regards
Ruwandi
rkherath
|
|
|
|
|
I'm displaying the results from the query in labels, but i need to loop thru it using a navigator . I'll give your suggestion a go and tell you what happens.
Thanx for the reply
Phoenix
|
|
|
|
|
Hey thanxs for the help. I managed to fill the dataset with the results from the query but dont know how to bind the dataset to the Binding Navigator . Please can you help me
Phoenix
|
|
|
|
|
Dear Used The Stored Procedure or View For Multiple Tables Data In One RecordSet
|
|
|
|
|
I am now developing a mobile application using Mobile Client Software Factory and c#. Currently what i need to do is, I have a screen where it have a choice of events, I will have a button where it will add the event from the system to the calendar that build in with mobile application and this will be the reminder.
Can i know whether this can be done?
Thanks.
|
|
|
|
|
Hello Friends
i Have 2 text box
both have validation on validated event
it work well but
when user open form & direct press close button of form
validate event fired first so , how i can prevent this validtion.
|
|
|
|
|
PriteshMalvan wrote: both have validation on validated event
When are you firing this event ? i think you are doing on pageload ..
Fire this event on submit button click if you have
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
Sandeep it is not related to pageload event. What exactly is happening is that when the user clicks on the close since all the validators are on so it fires the validation. So to avoid this you need to use the causevalidation property of the control. Set to false and things are done for you.
|
|
|
|
|
i thought that he has written some javascript validation in some event
i never made CausesValidation to true that might be reason
Any way Thanks for showing right path
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
You set the causevalidation property of the close button to false and it will work for you.
|
|
|
|
|
I think you are checking a null or empty value in your validation event. You should skip validation if the text is empty. Or you can add a bool _isClosing = false variable to your class and set it to true on Form.Vlosing event, then skip validation in your textboxes' validation event if _isClosing is true. Hope this helps.
|
|
|
|
|
Send the piece of code.
As i guess, your textboxes are empty when the use clicks close(X sign on to Form Titlebar) validation fails because you validate if the text entered in the textbox is empty or not, if empty fail the validation which vauses form to give focus to this textbox back instead of closing.
|
|
|
|
|
hi i am using remoting on c#.net window application trying to pass 1 int value to the server thru the network.
i have decided to use remoting but i feel that there is some limitation to it that dont fit what i need please advice me pls.
(i will post my test program below)
firstly i realise that when the client connect to the server the client just create an instance with the server's class and not actually passing any value over to the server...
secondly i cant find a way for the server to react when the client pass some values to it.
the class object:
<br />
namespace ClassLibrary1<br />
{<br />
public class Class1 : MarshalByRefObject<br />
{<br />
string aa;<br />
public Class1()<br />
{<br />
aa = "55"; <br />
}<br />
public string abc(string ab)<br />
{<br />
<br />
return (ab + aa);<br />
}<br />
}<br />
}
server:
private void Form1_Load(object sender, EventArgs e)<br />
{<br />
TcpChannel channel = new TcpChannel(8080);<br />
ChannelServices.RegisterChannel(channel);<br />
<br />
RemotingConfiguration.RegisterWellKnownServiceType(<br />
typeof(ClassLibrary1.Class1),<br />
"HelloWorld",<br />
WellKnownObjectMode.SingleCall);<br />
}
client:
private void Form1_Load(object sender, EventArgs e)<br />
{<br />
<br />
TcpChannel chan = new TcpChannel();<br />
ChannelServices.RegisterChannel(chan);<br />
<br />
ClassLibrary1.Class1 obj = (ClassLibrary1.Class1)Activator.GetObject(<br />
typeof(ClassLibrary1.Class1),<br />
"tcp://localhost:8080/HelloWorld");<br />
<br />
string lala = obj.abc("kings");<br />
label1.Text = lala;<br />
<br />
}
|
|
|
|
|
What is the issue you are facing?
Mubashir
Software Architect
Storan Technologies Inc, USA
Every job is a self portrait of the person who did it.
|
|
|
|
|
i found that i made a mistake while understanding the theory of remoting
|
|
|
|