|
Office.Interop.Excel works by invisibly opening a copy of excel in the background to perform the work - just as you would expect.
So yes, you do need Office (or at least the correct version of excel) installed on every machine your software is going to run on.
All those who believe in psycho kinesis, raise my hand.
|
|
|
|
|
Thanks for response.
Are you sure about that? Do i have to really install ms excel in all machines where i want to run my app?
|
|
|
|
|
Sorry about the delay in replying, but if you had posted it as a reply to my message, rtaher than yours, I would have got an email to tell me there was a reply! By luck I saw this, so can answer...
Yes. You have to have Excel installed on every machine that you want to run your app on, if your app uses Interop.Excel. You will get an exception otherwise (as you have seen!)
All those who believe in psycho kinesis, raise my hand.
|
|
|
|
|
Dear OriginalGriff,
Thanks a lot, now i know more about it
|
|
|
|
|
Hi,
I want to show multiple records on form. I dont want to use grid view..
I want to display records like showing lable on row..
Is there any repeater control like control in windows application.
Any other solution ?
Thanks
sjs
|
|
|
|
|
Obviously, there is nothing like this in Windows forms. But you can
create a control to achieve your goal. You just need to dynamically add
more controls for each row in your data.
Also you can check this: http://www.ewoodruff.us/EWSListControls.aspx
modified 27-May-14 4:57am.
|
|
|
|
|
Hi,
I am using regextest program and filtering out text using below regex
(?<=\<div class="middleadimggold"\>).*?(?=\</div\>)
now I would like to include this in my c# code so that i can write only the text that matches. I am unsuccessfully doing this by using below code. I think something is not right and its not filtering out the data.
string match = @"(?<=\<div class=""middleadimggold""\>).*?(?=\</div\>)";
using (StreamWriter sw = File.AppendText(@"c:\logs\data.txt"))
{
if (Regex.IsMatch(this.Text,match))
{
sw.WriteLine(this.Text);
sw.Close();
}
}
could someone please help. I think its something to do with inverted comma as when i ran the code in debug mode
match becomes
(?<=\\<div class=\"middleadimggold\"\\>).*?(?=\\</div\\>)
if I put above expression in the regex software nothing is being returned.
Thank you,
modified on Wednesday, January 13, 2010 12:36 AM
|
|
|
|
|
Pasted your code into my app, and removed the StreamWriter stuff (otherwise identical)
private void button1_Click(object sender, EventArgs e)
{
string text = tbPath.Text;
string match = @"(?<=\<div class=""middleadimggold""\>).*?(?=\</div\>)";
if (Regex.IsMatch(text, match))
{
MessageBox.Show(text);
}
}
It works for me if I paste
<div class="middleadimggold">Data</div> into the text box. The match works, and I get the message box - what doesn't happen with you?
All those who believe in psycho kinesis, raise my hand.
|
|
|
|
|
it doesnt write the matching text to a file. so i do need streamwriter stuff working
|
|
|
|
|
Ok, but if teh Regex bit works her, then it will be working there. Which implies it is your file, streamwriter, or the data that is faulty.
Are you getting any exceptions?
Are you sure your data contains the match string?
Have you tried a MessageBox or similar to check the data and the Regex match?
All those who believe in psycho kinesis, raise my hand.
|
|
|
|
|
does it works if there is a big space between <div class="middleadimggold"> and closing of ?
a typical example is as below:
<div class="middleadimggold">
<a href="bla">bla
notice the spaces after initial div
|
|
|
|
|
Ah! It's your data! Looking at at your other post, it isn't the big white space - it's the newlines. You need to make a small change to your app:
if (Regex.IsMatch(allRead, regMatch))
becomes:
if (Regex.IsMatch(allRead, regMatch, RegexOptions.Singleline))
Should fix it.
All those who believe in psycho kinesis, raise my hand.
|
|
|
|
|
Remove '\', there is no need to use '\' before '>'.
modified 27-May-14 4:57am.
|
|
|
|
|
makes no difference how so ever. my regex works fine in a regextest tool its just only when i try to filter the content via c# it doesnt work. here is my code
string fName = @"data.txt";
StreamReader testTxt = new StreamReader(fName);
string allRead = testTxt.ReadToEnd();
testTxt.Close();
string regMatch = @"(?<=\<div class=""middleadimggold""\>).*?(?=\</div\>)";
if (Regex.IsMatch(allRead, regMatch))
{
Console.WriteLine("found\n");
}
else
{
Console.WriteLine("not found\n");
}
part of the content that should match
<div class="middleadimggold">
<a class="asdf" href="http://www.asdf">
asdf</a>
<p>
asdf</p>
<p>asdf</p><p>asdf</p>
<p><span class="blue">asdf</span>
<a class="de" href="http://www.4asdf"><span class="a">(See on map)</span></a></p>
<p><span class="blue">asdf</span></p>
<span class="xx">
asdf
</span>
</div>
please note the spacing in the content, not sure if it matters?
|
|
|
|
|
Answer as by Original.. stated above.
correct the string>>
string match = @"(?<=).*?(?= )";
♫ 99 little bugs in the code,
99 bugs in the code
We fix a bug, compile it again
101 little bugs in the code ♫
|
|
|
|
|
First - The code used to create my version of a rubik cube was created by Peter Szilagyi; Arcus Applet - Rubik's Cube Simulator Applet. His code is not the problem it's the way I have implemented it into a windows form.
Second - It is entirely to hard to copy and paste code snippets of the code to show what and where it is doing the re-draw of the cube and it's cubie's so I have posted a .rar file with the entire window's project and I will reference methods within this project. RubikCube Project[^].
Basic layout of the application uses RubikCube : Control. Within the RubikCube I am overriding the mouse events to move the cube and on paint event to draw the cube.
In the Mouse Move Event I call:
rbx_mouse_X, rbx_mouse_Y are where the mouse was and _event.X, _event.Y is where the mouse current is.
axisRotX(Math.PI * (rbx_mouse_Y - _event.Y) / rbx_dimension.Height);
axisRotY(Math.PI * (_event.X - rbx_mouse_X) / rbx_dimension.Width);
axisRotX then calls:
_vector[rbx_Y] = _vector[rbx_Y] * Math.Cos(_angle) - _vector[rbx_Z] * Math.Sin(_angle);
_vector[rbx_Z] = _vector[rbx_Z] * Math.Cos(_angle) + _vector[rbx_Y] * Math.Sin(_angle);
and so on...
I the issue occurs when the mouse movements are quick the cube begins to decrease in size and distorts. I have a series of static values that the cubie's ( a sub class of Rubik Cube ) access during their paint method. I am not sure on the best way to architect the class layout to get the desired results but it seems the mouse move events are happening out of sequence and causing the cube to disfigure.
Any thoughts, constructive criticism, or suggested reference materials to help would be appreciated.
I'm listening but I only speak GEEK.
|
|
|
|
|
all the free web services seems to reject request after it reaches certain daily hits. I used this one http://dotnetguts.blogspot.com/2008/06/finding-country-from-visitors-ip-in.html[^]
but its getting a wrong country codes for example in below. I am using my iphone which is in sydney, australia, its logging country code as FR. could someone please help?
below is the details logged in database
IP, countrycode, browser agent
58.104.249.183 FR Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_0 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7A341 Safari/528.16
|
|
|
|
|
I don't know of any "free" sites that do this without a hit-limit. As with everything else, you get what you pay for...
|
|
|
|
|
I am not looking to pay for the tool. could you please assist as to why the one that I am using logs incorrect country code. its not the case always. please see the other logs. the first record is getting incorrect country code while remaining is correct.
58.104.249.183 FR
203.6.205.31 AU
203.6.205.31 AU
98.129.43.4 US
|
|
|
|
|
Message Closed
modified 23-Nov-14 6:55am.
|
|
|
|
|
how do i use this? and does it blocks after it reaches certain limit?
|
|
|
|
|
|
Now i have form1 and form2
datetimepicker1 and datetimepicker2 is in form1
i want to use datetimepicker1 and datetimepicker2 on form2 from form1,set datetimepicker1'modifiers and datetimepicker2'MOdifiers to public on form1, i wrote my code on form1 like this string from, to;
from = this.dateTimePicker1.Value.ToString("yyyy-MM-dd");
to = this.dateTimePicker2.Value.ToString("yyyy-MM-dd");
it can work very well
then wrote my code on form2 like this
Form1 frm=new Form1();
string from, to;
from = frm.dateTimePicker1.Value.ToString("yyyy-MM-dd");
to = frm.dateTimePicker2.Value.ToString("yyyy-MM-dd");
when i run my code ,from=2010-01-09,to=2010-01-09 on form2
but when i select dateTimePicker1=2010-01-05, dateTimePicker2=2010-01-09 on form1,
then run my code ,it shows from=2010-01-05,to=2010-01-09 on form1,but it also shows from=2010-01-09,to=2010-01-09 on form2,it do not change anymore on form2,i think it may be read from the most beginning.
i want to get the changed dateTimePicker.Value,how could i do
thanks everyone?
|
|
|
|
|
You posted here[^] a couple of days ago and didn't respond to any of the answers given.
[Edit] And here[^] too previously. [/Edit]
Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
This is a Cross post... And you have posted it a couple of times.. I advice others not to Encourage cross post... You will never get replies for cross post except that "This is a cross post" message from everyone..
Cheers,
Tash
|
|
|
|