It's the requirement. Where an age old traditional excel application to be converted/ redesigned as web application with out changing the look and feel much, as the client is not willing in changing the same old excel interface.
I'm exactly not sure whether this can be done by a grid. and I have big question of retrieving the data, formulas and macros of the excel application as is.
It's urgent and pls help on this.
The "requirement" seems to be to be able to access Excel workbooks over the internet (and not to eliminate Excel).
As Pete said, you can upload Excel workbooks to SharePoint and share them between users.
You get Excel "look-and-feel" and a "web application".
A "SharePoint Online" subscription starts at less than $5.00 per month where you can do a proof-of-concept. The Excel / Office components may add a few $ per month but you can cancel any time. Note that "external users" with read-only access to your SharePoint site cost nothing.
I'd be surprised if you could not get this up and running in less than a week (and no C# needed. Sorry).
of course it's some thing like accessing the excel work books over internet, along with some functionality enhancements like logs, database interactions, monitoring the data change as well.
I'm trying this in jquery, using the jquery.sheet plugin. which can be used to create a sheet just like excel. but here the problem is I'm not able to do much changes when the application demands any, as this is a free plugin and not much documentation is provided.
1. Keep in the backend "Your Excel Sheet based service". This can be implemented in you web server as a singleton (for perfomance) object that uses Interop for interacting with you Excel sheet.
2. Your web app, queries "Your Excel Sheet based service" to get the grid data to send to the browser
5. Any change is sent as a browser request to your web app (via Ajax or page reload)
6. Your web app, updates "Your Excel Sheet based service", so Excel applies the macros and calculations, and the new values are sent to the web browser on the request response (Ajax or page content)
Conceptually you get everything, and the best of both worlds. The good part is that you do not need to reimplement all your Excel logic (macros, formulas,...), the bad part is that you need to reimplement all the interface to reach this logic (grid cells paradigm, REPL cycle, ...)
Although it can be done, in practice this is far from an ideal solution as:
- An strategy is needed to avoid multiple users locking your Excel resource
- Using interop in the server might lead to memory leaks and stability issues. Also it can easily become a CPU resource hog.
- User interface and usability is greatly dependant on the chosen grid, and might depart greatly from Excel look and feel
Although the cons can easily overweigth the pros, depending on your requirements (number of users, complexity of Excel logic..), budget, resources and available time can be a way to go.
That should probably be done on the database (server?), using an SQL-statment. There it would be relative easy to manipulate your where-clause.
You're now comparing in-memory datasets. You could still iterate it for each record in table1 and see if it is contained in table2 (look up over the primary key). Also the other way around, see if anything from table2 is contained in table1. Write those to table three.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
I have developed a windows application that is used on a bunch of PC's on our network. I distribute it with click-once deployment.
On a couple of PC's certain GUI elements do not display / work as expected. For example, one of the forms contains a DataGridView, that has been set to not allow adding new rows. On one of the PC's mentioned however, the new row is visible, it does allow adding new rows. On another PC a form's title and a label on a StatusBar do not display at all.
Has anyone else ever come across this phenomenon ? Where should I look to fix this ?
Any help appreciated.
My advice is free, and you may get what you paid for.
Is it "a datagridview" that displays said behaviour, or do all dgvs in the application show the extra row? If there's only one form in your app that's using the dgv, I'd try to write a small app to reproduce the behaviour to confirm it using the minimal code.
If it is "one" control that is misbehaving, then the problem is probably in handling the control, not the control itself. I'd be checking the application for any constructs to swallow exceptions.
Different ways of displaying a control, yes, that I would expect - since there have been multiple versions of the common controls, with flat controls introduced later.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
could it be possible that one PC (or .net framework) handles events and such in a different manner / order than another ?
Highly unlikely, as it would break a lot of applications.
Johan Hakkesteegt wrote:
could that be dependent on the .net framework version
There's a change in NET 4.5 for resizing[^], but haven't seen anything specific in the other "what's new" articles. Even if there's a manifest saying to use the "new" common controls, I would not expect very different behaviour - a different look, yes, but changing the behaviour breaks existing apps.
How frequently is your timer running? It might be simpler to create a console application to check the queue and send the mail, and then use the Windows Task Scheduler to schedule it to run every n minutes.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
I agree 100%. Now I know why you guys suggested just writing a console app first.
But I made it past the painful part, and figured I would just finish the windows service.
I haven't really set the timers yet. I have 2 timers, 1 check timer and 1 job timer. I figure the check timer would run twice a day and book jobs for the job timer, the job timer would only run if jobs are present.
Would of been much easier to just write a console app and schedule each job individually.
I'm almost done, just need to start and stop the send message thread if I stop the service while jobs are running.
I choose the windows service because I run the website on a server core with minimum GUI. My preference was server core with no GUI, but I needed the shell window in order to use FFMPEG, which is a console app. So the console app left a bad taste, and I opted for writing something for use in the future.
Plus I don't get the eventlog thing, Am I using this right here? The MyServer, Should I replace that with my machine name?
eventLog1 = New System.Diagnostics.EventLog()
If (Not System.Diagnostics.EventLog.SourceExists(eventSourceName, "MyServer")) Then
eventLog1.Source = eventSourceName
eventLog1.Log = logName
eventLog1.WriteEntry("Service has installed successfully", EventLogEntryType.Information, 1)
So I guess in a service, you can't display a message box. Not sure about the console line, I just need to be able to see some values so I can at least get the service installed and running.
About event ID's, I assigned an ID of 1 for creating the install, but I get this message, any help would be appreciated.
The description for Event ID 1 from source smtpMessenger cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
Do I have to create a description file for each ID I assign to an event?
1. Service can not interact with UI (messages) by default, but it can be changed. However the better way is to use some helper that reads the state/configuration of a running server and adjust it as needed...
2. I didn't understood the other parts - are you trying to create a self installing service?
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
config files - app.config or other file
of course, they can contain minimal info, like the connection to the database and have the rest of the config data stored as key:value pairs in a separate table
Then usually one or more helper programs - one to set up/maintain the config info (especially if all/some is encrypted), and a 'tray helper' program that displays status, allows control of the service etc
A service Im writing at the moment also has
a) an in memory database for statistics (in addition to using performance counters etc)
b) an in-built telnet & http server to inspect values (and maybe control some aspects of the service)
if you wanted to cut out writing the 'boilerplate' yourself, look at something like cinchoo http://cinchoo.com/category/application-host/?orderby=ID&order=ASC[^] - my only bugbear with it is its not open source - there are other 'service frameworks' out there iirc - while writing a service from scratch once is 'useful', the real work is the service 'tasks', so using a pre-built framework allows you to focus on that
In this way, I could have the process on server "CAT" run Services "Scratch" and "Purr", while the process on server "DOG" could run Services "Wag" and "Bark" and moving Services from one server to another was simple. All servers had exactly the same code deployed.
Be careful with that file because if you make it ill formed the application will not load and figuring out that problem is difficult.
I guess the windows app could also start and stop the service as well
A windows service is a windows service, so I am not exactly sure what you mean.
It is possible to structure the build such that one can have a command line executable and a windows service but you probably don't want to try that for your first service.
You might want to also looking into a logging API. Helps in figuring out window service errors.
Well it dawned on me that I already have a configuration file in the web application that I can adsorb for the database connector string and website name. So I can put the service in the web application. Took me awhile to figure that out.
Perhaps the web application can start the web service, and the service will wait for the date and time to start doing its thing via timer.
So on to my first Windows Service. It's new to me and very frustrating. I just got the base code to work, the framework, so now it
Creates an Event Log
Writes to the Event Log
Connects to the service controller
Writes the event log registry entry, and message id file to connect to.
WOW, that was a mind bender. There's help out there, but it's so generic.
Now I know why many said write a console app.
Well now I can go on to writing the job code, and then figure out how to write an id system dll for the event log id's and messages, and register that file.
So I'm going to try reading my config file in the web app first, and see if I can read it, if so I'm on my way to more frustration.
One thing to be aware of. You're doing a case sensitive comparison of a string there. What happens if the case doesn't match what you're testing for (hint, you won't trigger any of your enable conditions)?