|
Got the answer
string myFileName = "sample.xls";
using (WebClient wc = new WebClient())
{
wc.Proxy = null;
sFilePath = AppDomain.CurrentDomain.BaseDirectory;
sFilePath = sFilePath.ToLower().Replace("\\bin\\debug\\", "");
sFilePath += "\\UkExcel\\" + myFileName;
wc.DownloadFile(sFileName, sFilePath);
}
|
|
|
|
|
If that is your answer then I suggest you work on improving your questions.
Your problem actually has nothing to do with Excel so you will want to leave that out of your subject line for a start. All you are actually looking to do is download a file from a website to a local storage directory.
An example of a good question might be..
Subject: Downloading a file from a given URL
Message: I am trying to download a file from a URL and save it locally on my hard drive. How can this be achieved?
...of course, you should have easily been able to Google this answer without having to post in CP, but hopefully this will help you to write better questions in the future
return 5;
|
|
|
|
|
musefan, the guy may not know how to format his question , but the end result is obvious for us , so instead of commenting the way he exposes his question , if you have an answer to his well clarified question so help him or just keep silent !
Human knowledge belongs to the world.
|
|
|
|
|
snouto wrote: the guy may not know how to format his question , but the end result is obvious for us
So why was the only attempted answer nothing to do with what the OP was trying to do?
snouto wrote: if you have an answer to his well clarified question so help him or just keep silent
As you may already know there is more than one message type which to me suggests not everything needs to be an answer - All I have done is suggested ways in which the OP can improve his questions in the future so that it makes it easier for people to give an answer that can help
If you want somebody to cut back on messages that didn't need to be said then I suggest you look at the one I am responding to, and the one you are going to respond back to me
return 5;
|
|
|
|
|
Sorry... but that really is a bad answer. I know the OP question wasn't great but you seem to have just focused on the words Excel and Save and posted the first link you could find
In fact, did you even get past reading the subject line?!
I do hope you answer other questions with a bit more effort Mr. MVP
return 5;
|
|
|
|
|
hello
I'm trying out Visual Studio Performance Explorer - testing on a WIN32 console application. I clicked "Launch with Profiling" and generated a report.
But call stack don't show anything beyond Main(...)?
For example, Call Tree shows
> MyConsoleApp.exe
> mscorwks.dll
> MyConsoleApp.Program.Main(string[])
I does not go further down. In "Program.cs" I have other methods, none of calls to these methods are shown.
Thanks
dev
|
|
|
|
|
|
For a C# program that i have made the deployment installer, and i have set to use 32x32 as the desktop icons, but when user changed the view in the desktop, i found that other programs will display a icon with higher resolution, so how could i do it in C#?Thanks
|
|
|
|
|
.ico files can hold multiple icons. One normally creates the same image at different resolutions, such as 16, 32, 48, 64, 96 pixels square. Windows will pick the appropriate one, which depends on some user settings and on the Windows version itself.
When the ideal size isn't present, Windows will rescale (upscale only?) another size, which is bound to look suboptimal.
|
|
|
|
|
Thanks, i have found a software to combin the ico, and now i and trying. thanks
modified on Thursday, January 6, 2011 12:31 AM
|
|
|
|
|
This[^] may interest you.
|
|
|
|
|
hello everybody,
here's what i'm doing:
1. i'm retreiving data through API(atom format),
2. i'm storing all retreived data in a datatable,
3. i'm binding this datatable to a gridview
the porblem is that these APIs are feeding thousands of records so each time i'm paging i have to go on with all the above steps (1, 2 and 3)
this procedure is taking a lot of time
i believe there is a faster way to do that ,
Apreciating any help,
Thank you in advance
|
|
|
|
|
|
thank you for your answer,
however this method cannot be applied to my project since i can't control the ammount of data record retrieved by the API
again the problem is when i postback the page, i have to retrieve again all the data, i have no problem to load at the first time
thank you again for your concern
|
|
|
|
|
Hello ,
I am Make a program which make processing to some data and regarding as the volume of Data. I want to make progress bar the take interval of the accurate time of process.
|
|
|
|
|
Well, the basic usage of the progress bar I have seen would be:
1.-Calculate the whole data that needs to be processed(number of items perhaps).
2.-Process the data in a item by item basis.
3.-Over each iteration of the items, you'll notify the progress bar of the completion of the item, hence making the bar progress .
If you'd like to display an estimated time for the whole collection's process time, you'll need to do something similar, but measure the time it took, calculate average of items processed so far, and multiply it by the number of items to be processed. Not exact but you can get a well estimate.
Is this what you were looking for? We can be more explicit if you let us know whether you're using the default progress bar of one of your own.
|
|
|
|
|
If the job is rather homogeneous, you could use a progress bar that shows progress as the fraction of the work that is done (job items, not seconds); and you could measure how long it takes to get 10% done, then also display a little string giving your estimate of how much time will still be needed.
The formula would be:
time_remaining = time_elapsed * work_remaining / work_already_done
which you shouldn't use as long as work_already_done is too small, as it would initially be rather inaccurate (and even starts with a zero divide).
|
|
|
|
|
I'm trying to query Active Directory and find out if a group exists
I was looking at Howto: (Almost) Everything In Active Directory via C#
and I tried to use the code below, but I'm not sure what I'm doing apparently because I can't get it to work. Can anyone help please?
public static bool Exists(string objectPath)
{
bool found = false;
if (DirectoryEntry.Exists("LDAP://" + objectPath))
{
found = true;
}
return found;
}
modified on Tuesday, January 25, 2011 6:40 AM
|
|
|
|
|
I have been working through some code from articles here, altering to suit my needs etc
One particular thing puzzles me.
Say DgvFilterHost inherits from DgvBaseFilterHost.
Why, if a class inherits from a base class, do they declare an instance of the new class as the base type?
for example....
public DgvBaseFilterHost FilterHost {
get {
if (mFilterHost == null) {
FilterHost = new DgvFilterHost();
It seems it makes additional public properties created in DgvFilterHost inaccessible without casting.
Even then I seem to have trouble accessing additional properties.
Curious as to why you would not make FilterHost type DgvFilterHost in this example?
Thank in advance
AussieLew
|
|
|
|
|
There are many reasons for doing this. One reason for doing this is to use Dependency Injection, where you need to refer to a type in your code, but the actual implementation you'd be working on is a derived class. This is also typical behaviour in abstract class factories.
|
|
|
|
|
salam
dostan irani agar momkeneh email khodeshon ro bezarand ta betoonim ba ham tamas dashteh bashim.
ba tashakor - javad andamani
|
|
|
|
|
As a first time poster, you may not be aware, the etiquette on this site is to post questions in English. By using English, you get the most chance that your question will be answered. If you'd care to edit your question, we may be able to help.
|
|
|
|
|
hello
I am javad andamani from iran.
the question is type FARSI(persian).
tank you
|
|
|
|
|
The question type mught well be Farsi, but the only language you should be posting in (except the dedicated Indian and Chinese Forums) is English. Please read an FAQ.
|
|
|
|
|
Well whoop-do-frakkin-do. That's no good to me - I don't read Farsi, so how in the name of St Steve Jobs do you expect me to be able to answer it? For all I know, you could be posting a recipe for your mother's delicious home made fudge. As I said before - rephrase your question in English. I'd already figured it was Farsi.
|
|
|
|