|
Dan_K wrote: I do not want the Excel grid or cells to be part, just the chart output that is inserted in the worksheet. Thanks.
A lot of those formula's are calculated at runtime, and are not exactly "inserted" in the physical file.
We got quite some articles on reading Excel-files and getting their content - check them out.
Bastard Programmer from Hell
|
|
|
|
|
Any links to resources that describe that? I will be very much happy with that.
|
|
|
|
|
On of the articles on the subject can be found here[^].
Bastard Programmer from Hell
|
|
|
|
|
Thanks Eddy, I think the charts are inserted in the worksheet. I don't know if there is a way to send only the chart into my application. Any way to do that?
|
|
|
|
|
What do you mean with "send into my application"?
Excel does not store a chart, but a description of a chart - one that's usually based on values within the same document. You can probably copy the contents to a bitmap and store that in your database.
Bastard Programmer from Hell
|
|
|
|
|
The short answer is no, there isn't any way to redirect the chart output to a control in your application.
The long answer is kind of, but it is so over the top complicated as to make it not worth the effort at all. Excel can provide data, but it's horrible at providing graphics.
The best solution is to just get a graphing library and setup the chart in your own application.
|
|
|
|
|
When you copy an Excel chart to the ClipBoard, it gets stored in the ClipBoard using a dozen different formats, including PNG, GIF, Bitmap, and EnhancedMetafile; which means any .NET app can retrieve it as an Image or Bitmap and work with that.
So start by using Office Interop (don't ask me for details, I don't know; Google and CodeProject do know) and have it copy the chart for you. Then write some code to paint the image where you need it.
|
|
|
|
|
I you intention is to display graphs/charts then you can achieve this by using the free library shipped with .Net 4.0. have look
Happy Coding
|
|
|
|
|
I need to write some linq to sql statments for sql server 2008 r2 database that accomplishes the following tasks in a C# 2010 .net application:
1. I need to delete one row from a table where the record I would be deleting is the key to the table called main.
2. I also need to delete records from an associated table (called sub) that has the key to the main table as one of its columns. This table called sub has no foreign key constraints setup as a requirement to the table called main. In the table called sub there can be from 1 to 500 occurences of the reference to the table called main.
3. I am not certain how to setup these two deletes? Would this be separate linqs statements? would I need two separate DeleteOnSubmit statements? Would I wrap the two delete statements into one transaction so that if there is a problem, I can rollback the changes?
Can you tell me and/or point me to a reference on how to complete this task?
|
|
|
|
|
Hi,
Basically I want to press a keyboard combination and have the screenshot sent via http to a server. During my research I was astounded of the complexity of even creating a keyboard shortcut which involved low level programming. Can you point my in the right direction in terms of libraries and technologies? To accomodate the workflow I want to be able to press the key combination anywhere from Windows and the application should then subsequently automatically send the picture via an HTTP POST request to a server.
Regards Anders
|
|
|
|
|
This[^] might help you getting the keyboard hook in place. In order to capture the screen, you might find this[^] helpful.
|
|
|
|
|
And finally you could use the WebRequest class to POST it to a server. Mind you, you probably will need some authentication to avoid the server being susceptible to all kinds of attacks...
There are several articles and tips around here that could help you, like maybe this one: Accessing the secured site using Webrequest[^]
|
|
|
|
|
mupersan wrote: During my research I was astounded of the complexity of even creating a keyboard shortcut which involved low level programming.
- Go to your desktop
- Create a shortcut to "C:\Windows\calc.exe"
- Right-click on the shortcut, select "Properties"
- Type in your favorite shortcut
- Click on the "OK" button
Bastard Programmer from Hell
|
|
|
|
|
yep, that is known as a low level of programming...
|
|
|
|
|
I want to create a method that checks to see if a row or a table is currently locked in SQL Server ..
I want the method to accept a table name and key and then return true or false.
The only thing I can't seem to understand is what code do I write or how do you check to see if a table or row is locked in SQL Server ????
Thanks in advance ..
GBX ..
|
|
|
|
|
The first question is WHY?
The record state can change between the time you look at its state and the time the state is returned back to the client. Every time you look at the record state, the information is already out of date.
|
|
|
|
|
yeah good point .. thanks ..
jon
|
|
|
|
|
It's just not worth the effort.
Simply handle Exceptions when they happen.
|
|
|
|
|
I have an interesting requirement and was wondering if anyone might be able to point me in a direction that could get me started.
I've developed an application that is used on many workstations in the company and all access the same database. From time to time I see little issues in the DB that I can't figure out how a user might have managed to make the particular change. It might be a bug in my code but it's such a difficult issue to debug as I usually can't even replicate the problem.
So I was wondering if it would be possible to write some or other function that is called every time the user clicks on any control on the form. This procedure then stores the name of the control, the date and time and perhaps even the coordinates of the click (or something like that) to a List which can then either be written to a local log file or to some table in the DB. This way I'd be able to see exactly the sequence of clicks that preceded a certain change in the DB.
The problem is, the application is huge and I don't want to go add a line of code that calls this function at the start of every OnClick() event handler. Is there a way I could have my function called for every click that happens on any control in any form in the application before the relevant OnClick() event handler is called?
Any ideas on alternative approaches that might help me track the users' mouse clicks would also be very welcome.
|
|
|
|
|
Dewald wrote: Any ideas on alternative approaches that might help me track the users' mouse clicks would also be very welcome.
To start off; not every user uses the mouse. I'm using a keyboard simply because it's faster to hit a shortcut then it is to find the cursor, point to mouse to a specific region and click twice. And again, because the first mouse-click wasn't registered.
What you'd like to trace, are the methods that are being executed. It sounds like PostSharp[^] could be helpful here.
A lightweight solution would be to iterate through all the components of a form, and register an extra handler for the most interesting events, and log those.
Bastard Programmer from Hell
|
|
|
|
|
OK, that sounds like a good approach. Thanks. I'll investigate that.
|
|
|
|
|
You're welcome
|
|
|
|
|
To start off; not every user uses the mouse.
This is true but buttons and menu items still fire 'click' events even if you select them with the keyboard (and, personally, I'd recommend you do this with any custom controls you write that have an action on click, too).
|
|
|
|
|
BobJanova wrote:
This is true but buttons and menu items still fire 'click' events even if you select them with the keyboard (and, personally, I'd recommend you do this with any custom controls you write that have an action on click, too).
Yup - but I still see a lot of buttons that only react on their Control.MouseClick event - just wanted to touch the subject to ensure that it's not overlooked
Bastard Programmer from Hell
|
|
|
|
|
hi...i am using rdlc report in c#.net 3.5 and vs2008.
i want to enter a page break after a group...plz help me i use page break at end property but its not working fine.report generates blank pages in between.
|
|
|
|