|
how to create excel sheet using c# withoue excel objects
.
can anyone help...
thanking in advance..
byeeeeeee
sree
|
|
|
|
|
Can you be more specific?
If you just want to be able to view the output of your program in Excel, you can create a CSV file.
Cheers,
Vikram.
http://www.geocities.com/vpunathambekar
Google talk: binarybandit After all is said and done, much is said and little is done.
|
|
|
|
|
Hi Sree,
ComponentOne has a component, C1XLS for .NET, that will allow you to create Excel spreadsheets. Excel does not need to be present on the development or end user's systems to create the xls file. The evaluation version includes samples and documentation that will show you how to get started. Versions of the component exist for both the 1.x and 2.0 .NET Frameworks. For more information, please refer to the following link: XLS for .NET Information[^]
Suelinda W
Customer Engagement, ComponentOne LLC
|
|
|
|
|
How can I create a windows service in such a way that it allows me to install multiple instances with same name (may be someting like versioning) on a single machine???
Any help to accomplish this task will be greatly appriciated.
I would love to change the world, but they won't give me the source code.
|
|
|
|
|
You can't create multiple instances of a service with the same service name. This is because a registry key is created using the service name. The only way around this is to use a different service name for each instance (i.e. Service.1, Service.2, Service.3, etc.)
|
|
|
|
|
I want to retrive all the files in a directory of certian types (.bmp, .jpg, .gif) etc etc. But I seem to only be able to pass in a single filer to the functiond
filesInDirectory = Directory.GetFiles(PictureDirectory, "*.jpg");
Works fine but:
filesInDirectory = Directory.GetFiles(PictureDirectory, "*.jpg;*.bmp");
Does not work correctly at all, Is there any way to do this, without calling multiple times and joining arrays?
Also it seems to just return them in alphabetical order, is there anyway to return them in the way they are sorted/being viewed in Explorer?
Thanks!
|
|
|
|
|
I googled a bit and tried using ; and | as separators, but they don't work. In fact, using | as a filter separator throws an exception. I suppose the best bet is to call the method multiple times and club the results together.
Kluch wrote:
Also it seems to just return them in alphabetical order, is there anyway to return them in the way they are sorted/being viewed in Explorer?
Are you saying that if the contents of folder Foo appear sorted by name in Explorer, your app should offer them sorted by name; and if the contents of folder Foo appear sorted by date created in Explorer, your app should offer them sorted by date created? AFAIK, there's no way to do this.
Cheers,
Vikram.
http://www.geocities.com/vpunathambekar
Google talk: binarybandit After all is said and done, much is said and little is done.
|
|
|
|
|
ive got a problem, and i dont understand why it happens. when a function is called, it is suppoed to open a new form:
namespace.cmdfeedback feedbackform = new namespace.cmdfeedback();
feedbackform.OtherForm = this;
feedbackform.ShowDialog(); but the form isnt displayed. however, if i add a messagebox.show(""); to the new form, the form gets displayed (as well as the messagebox). how can i get the form to display without the messagebox? i have no clue wat is causing this. here is the code for the form that should be shown.
public cmdfeedback()
{
InitializeComponent();
}
private void cmdfeedback_Load(object sender, EventArgs e)
{
timer1.Enabled = false;
this.Show();
OtherForm.statusbox.AppendText(Environment.NewLine + "Data recieved from client.");
try
{
richTextBox1.Text = "something";
}
catch (someexception)
{
richTextBox1.Text = "Error recieving data.";
}
}
-- modified at 19:57 Friday 25th November, 2005
|
|
|
|
|
This is a shot in the dark, but can you try feedbackform.Focus() ?
Cheers,
Vikram. "When I read in books about a "base class", I figured this was the class that was at the bottom of the inheritence tree. It's the "base", right? Like the base of a pyramid." - Marc Clifton.
|
|
|
|
|
Well, this happens because the form, normally, won't show itself until the Load event is completed.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have a program that has a form1.cs which calls and starts each thread in the workerthreaded.cs file. While the program is running it fully freezes until it stops. How can you make this so it always runs and the interface can still be used while the code is still running?
|
|
|
|
|
the code is:
<br />
Application.DoEvents();<br />
You can write it before the thread starts...
I hope it helps
Enrico
|
|
|
|
|
|
I have opened a Word Document and done a compare to another document, setting WdCompareTarget to New. Where I am stuck is saving the new document without user interaction.
Here is the code that compares the documents:
WordDoc1.Activate();
WordDoc1.TrackRevisions = true;
WordDoc1.ShowRevisions = true;
WordDoc1.PrintRevisions = true;
object CompareTarget = Word.WdCompareTarget.wdCompareTargetNew;
WordDoc1.Compare(
secondfile,
ref missing,
ref CompareTarget,
ref missing,
ref missing,
ref missing,
ref missing,
ref missing
);
If I do:
object SaveChanges = true;
WordApp.Documents.Close(
ref SaveChanges,
ref missing,
ref missing
);
then the Word Close box comes up and I can specify a name, but I'd like to save to a file specified in a variable. How do I get a reference to the new document?
Thanks ...
|
|
|
|
|
Word.ApplicationClass WordApp;
WordApp = new Word.ApplicationClass();
Word.Document WordDoc2;
Then, after the compare:
WordDoc2 = WordApp.ActiveDocument;
|
|
|
|
|
The program I'm creating allows a user to scroll through a waveform consisting of 10,000+ data points. As the user scrolls through the waveform, a magnified portion of it is displayed on another area of the screen. The magnified portion can plot anywhere from 0 to the entire length of the waveform's points.
Right now I'm having a major refresh slow down when the number of data points for the magnified portion is too large. To plot all of the points I'm using the Graphics.DrawLines() method. To help the performance I also added a Timer (50ms) to limit the number of Invalidate()'s when the user is scrolling, which helps a little bit.
I tried drawing the magnified portion with an offscreen memory bitmap, but it didn't really me.
Can direct draw help me with this in any way?
|
|
|
|
|
Well, you can only plot as many points as the width of your display window for this graph, which is what? 1024 points at most? If you show all 10,000 points, your overdrawing the same column of pixels 10 times before moving to the next one. Figure out how wide your client window is, this will be the number of datapoints you can show. Then do a little math to figure out how many datapoints to skip between adjacent pixels. For example, you'll only look at every 25th datapoint when plotting your graph.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
The magnified portion is plotting a lissajous signal, so the display width isn't a factor. I thought about "skipping" datapoints, but wouldn't that misinterpret the data being displayed?
Thanks for the reply
|
|
|
|
|
I am writing two programs, one in c++ and one in c#. These programs are using windows messaging to talk to each other. In the c++ program, I used this line of code to register the message to send...
UINT MSG_TAKEPICTURE = RegisterWindowMessage("CMD_TAKEPICTURE");
In the c# program I also needed to register the message. I did that with this line of code...
private const int CMD_TAKEPICTURE = 49855;
I got the number from stepping through the c++ code to find what number MSG_TAKEPICTURE was being assigned with. The message transfers worked fine. But when I rebooted the computer, this number changed. Is there a wildcard variable that I need to put in place of the number in the c# code?
Thanks,
Roy K
|
|
|
|
|
From the documentation:
The RegisterWindowMessage function defines a new window message that is guaranteed to be unique throughout the system. So, we're guaranteed a unique UINT , just not the same UINT .
Here's what you can do. In your C# source, include the following code in the appropriate places:
[DllImport( "user32.dll", SetLastError=true, CharSet=CharSet.Auto )]
static extern uint RegisterWindowMessage( string lpString );
CMD_TAKEPICTURE = RegisterWindowMessage( "CMD_TAKEPICTURE" ); Now, your C# and C++ code will have the same value associated with the message name.
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
-- modified at 19:42 Friday 25th November, 2005
|
|
|
|
|
Prefect, worked like a charm. This is the second time I have used these boards for a problem that I have had, and the second time a solution surfaced. Many thanks for the fast reply.
Roy K
|
|
|
|
|
Glad to hear that. Happy coding.
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
I am currently working on a digramming tool. I have used picture box as the container and have made a control called as the BoxControl...now i wish to make a control that can join teo box control by a line as we do it in Visio..I am drawing a diagram below to elucidate the problem
|||||||||| |||||||||
|BoxCtrl |==========|BoxCtrl| The link shown between the two blocks is what ia m looking 4
|||||||||| |||||||||
It would be great if someone could send a samplecode__otherwise the logic is fine.
Thanks in advance
RaHuL
|
|
|
|
|
I'm looking for a tutorial/primer that will explain the very basics of using Visual Studio, C#, and SQL Express to build applications. I've not worked with databases and c# before - so I'm new to this.
Anyone know of a good place to find this information?
I've been looking, but haven't found anything good. Thanks.
|
|
|
|
|
Let me rephrase that. I work constantly with C#, and I've worked with SQL databases, just not both together. I have a very simple understanding of ADO.NET. I'm most interested in finding out the correct way to use "data sources" via the VS IDE's interface as connections to databases.
I hope that makes sense. Thanks again.
|
|
|
|