Thursday, March 21, 2013

Shout out to EPPlus

I just have a quick shout-out to someone who doesn't know they helped me out with a project. I needed a way to generate an Excel spreadsheet from inside a c# application. My client for the project wanted something more detailed and more usable than a .csv export file, because the single page of data was, to use the database lingo, not normalized. I had data repeated all over the place, and it was hard to read.

After a quick web search, I found EPPlus, which did exactly what I needed. I wanted to both write the spreadsheet to a file, and to build it in memory and attach it to an email which my software sends in the background without opening up an email client. The first I figured would be easy, but the second required writing to a stream, and EPPlus was already set up to allow for both files and in-memory streams. A few hours of data layout on multiple pages, and voila! I have formatting, sorting, column sizing, and as many pages as I need. Alas, I don't know how to build a pivot table worth beans, but EPPlus does that, too, according to the docs.

Excel Screenshot

Their sample code project was really helpful to look up things like formatting and sizing of cells. The whole update to my code got me thinking of how you can do really cool stuff by intersecting multiple areas of expertise. Mix computer based testing with Excel and email, and you can end up with something pretty slick. It's the sort of programmer candy contract coders thrive on.

Wednesday, February 27, 2013

PingGraph Release

My network monitoring tool PingGraph has been updated and released. You can download it here. I implemented a couple of customer requests to enhance the email alert system to be more user friendly.

First, it has a threshold so it won't send an alert until a specified number of consecutive time-outs or over-threshold ping times have occurred.

Second, there is a test button so you can verify that you have your email server settings correct.

As always, you can give it a test run for free with no time limits. Registering it allows for a longer saved data history, and logging data to a file.

Let me know what you think!