Does a good wrapper class and/or library for open xml Excel editing exist? - excel

I'm looking for a nice library for editing and/or generating Excel documents on our Windows server. I feel that the open xml sdk is probably the way to go, but to me the learning curve seems steep and our dev time is limited. I think that it just shouldn't be that difficult to edit an Excel document. I'm ready to reinvent the wheel, but thought it would be worthwhile to ask first whether there is a good project/library out there that wraps open xml and makes interacting with Excel easier.
In this official MS tutorial, the code that retrieves the value of a cell is dozens of lines long.
http://msdn.microsoft.com/en-us/library/bb739834.aspx?cs-save-lang=1&cs-lang=vb#ManipulateOpenXMLExcelPowerPoint_RetrievetheValueofaCellinaWorksheet
That seems incredibly unwieldy, and I'm hoping for a better interface to this functionality.
Note: I've puzzled about how to make this question more StackOverflow friendly, but I don't know of a better way.

One of the comments mentioned a wrapper library that is exactly what I've been looking for. closedxml.codeplex.com

Try SpreadsheetLight. Disclaimer: I wrote SpreadsheetLight.
And this question is possibly a duplicate of this:
OpenXML libraries (alternatives to ClosedXML)

I use Simple OOXML and it's quite neat. And free.

Related

Implementing a Text Editor

I know this question may be a bit involved, but I would like to know the basic skeleton of how to make a desktop text editor that one can use for coding. Very generally speaking, what tools should I use to display text to a window (how to display that window), and how to handle text (I think this is with a split buffer).
Not looking for any details, just a very broad and general skeleton of how this is done. I am thinking about working in Java or C++. Thanks!
I'm sorry people downvoted you without explaining why you deserve them. I'm guessing people think your question isn't educated enough? But in any case, I'll try to get you started. I am not educated enough to answer your question, but I can show you how you can answer it yourself and probably learn a lot more than you would have gotten from here.
https://github.com/vim/vim/blob/master/src/README.txt -The readme for the vim source code, which is all written in C. Not exactly C++, but the better you are at C, the better you are at certain facets of C++. And if you look at the list of source files in the readme along with their short descriptions, you do kind of get a skeleton.
Notepad++ actually is written in C++, but I suspect the GUI overhead would make it significantly harder to trace. Still, if you want, https://github.com/notepad-plus-plus/notepad-plus-plus/tree/master/PowerEditor/src

Sorting data from excel spreadsheets into new files

so my issue comes from the excel data I currently have which I need to convert into 4 separate forms, each with different details. The specfics don't really matter, but what I'm trying to do is code some kind of script that would do into this data and extract the stuff I need, therefore saving me tons of time copying and pasting.
The problem is, i'm not really sure where to start. I have done some research so I am familiar with csv files and I already have a pretty good grasp on java. What would be the best way to approach this problem, from what I have researched, python is very helpful at these string type manipulations, but I also know that it could be done in java using buffered reads/file writes, but I feel like that could get really clunky.
Thanks

Can Haskell [easily] do COM?

Alright, so I don't really know much about COM. What I do know is that if you write code in one of the Microsoft-sponsored programming languages, then you can write something like 3 lines of code to launch Excel, open a blank workbook, stuff some data into the cells and tell Excel to graph it. But I have no idea how this black magic actually works; all I know is that it's related to COM somehow.
Is it possible to do this kind of thing with Haskell? Is it "easy", or is it going to be hellishly difficult? Because if it's easy, I might try and get this to work, but if it's really hard, there are simpler ways to make Excel graph things...
I'm aware that you don't actually need to learn COM just to graph stuff. (E.g., I could use GraphVis or GNUplot, or Google Chart, or write a small Cairo function, or...) I'm interested in how easy or hard it is to do COM with Haskell, and this is just a motivating example.
HDirect used to be the standard, as it was last uploaded 3 years ago I imagine it's bitrotted a fair bit.
Looks like there's a new package aimed at doing the same sorts of things.
Sorry, I'm may be a little bit late.
There is already someone who plays with excel:
Excel Automation with haskell gives a seg fault
I've written some scripts who communicate with Clearcase and Clearquest.
It was quite easy until I get problems with variant StringArray (look
at my question on SO).
I've used HDirect in order to generate the Haskell glue code. The procedure is:
launch the OLE/COM Object Viewer and select View Typelib in the File menu
select the DLL (e.g. ccauto.dll for Clearcase)
save the IDL file
run HDirect on this IDL file in order to get the haskell glue code
import it in your project

How to write a protocol document

I am writing a protocol for my Game, and I am not sure what software to use for that.
I been trying writing it in Microsoft Word, and Excel, but it's not always easy to read or edit it.
Is there any good practices or tools that can help me with it?
The standard tool for describing protocols is message sequence chart which has been used by the telecom industry (and others) for decades.
It is a really powerful tool you most certainly should learn and use. I recommend using http://sourceforge.net/projects/msc-generator/ to edit and generate charts.
You can use doxygen for this. You either can implement the doc of your protocol somewhere in your source or create a stand-alone-file. Doxygen is used for source-documentation normaly but should also work well for this.
Doxygen also implements mscgen, which should become handy for your purpose.

What is a good web-based Grid that accepts Excel clipboard data?

Any good recommendations for a platform agnostic (i.e. Javascript) grid control/plugin that will accept pasted Excel data and can emit Excel-compliant clipboard data during a Copy?
I believe Excel data is formatted as CSV during "normal" clipboard operations.
dhtmlxGrid looks promising, but the online demo's don't actually copy contents to my clipboard!
I'm currently using dhtmlxGrid and we have the Excel copy/paste functionality working. dhtmlXGrid is the most full featured javascript grid package that I've found.
On their website, dhtmlXGrid claims to support Clipboard functionality in the Professional version. (However, I noticed the Sample on their site isn't working on my Firefox. EDIT: It's probably the permissions issue that Nathan mentioned.)
In any case, we had to do some extra work to get the exact Excel copy and paste functionality we wanted. We essentially had to override some of their functionality to get the desired behavior. Their support was pretty good in helping us come up with a solution.
So to answer your question, you should be able to get them to support copy and paste if you purchase the Professional version. I'm just warning you that it may take some additional work to fine tune that behavior.
Overall, I'm happy with dhtmlXGrid. We use a lot of their features. Their support is pretty good. They usually take one day to respond since they are in Europe (I think). And Javascript is by its very nature open source so I can always dive in when I need to.
Not an answer, but a warning: my company bought the 2007 Infragistics ASP.NET controls just for the Grid, and we regret that choice.
The quality of API is horrible (in our opinion at least), making it very hard to program against the grid (for example, inconsistent naming conventions, but this is just an inconvenience, we have complaints about the object model as well).
So I can't say that I know of a better option, I just know I will give a try to something else before paying for Infragistics products again (and the email support we got was horrible as well).
I was wrestling with this problem several years ago (2004 I think). We ran into the problem that Firefox doesn't allow scripts to read the clipboard by default (but you can grant access to the clipboard).
There's other ways of reading the clipboard data as well...Flash, for instance, can read the clipboard. There's a good article on ajaxian to explain how do to this behind the scenes.
In the end, we couldn't find a web-based Grid that fit the bill, so we had to create our own in a mixture of Actionscript and Javascript.
I'd hate to be Captain Obvious here...but what about a plain old .NET Gridview control? You can copy Excel data into it and out of it...and you can run it on any system with the .NET platform installed.
http://dhtmlx.com/dhxdocs/doku.php?id=dhtmlxgrid:clipboard_operations

Resources