Gavin Bowman's blog

Excel From C#: What I did.

Picking up where last week’s introduction left off, I’m going to explain how I added Excel export support to one of my products.

As a little background, in case you missed the introduction, I had a couple of feature requests from customers which involved exporting to Excel. The most important was a simple data table export, the files were probably going to be imported into other systems, so no formatting was necessary, and compatibility was the priority. The second was less important, but it was going to be viewed rather than processed, and relied on the formatting of the output.

Excel from C#: An Introduction

A slight change of direction for me this week: a summary of the options available when you need to produce Microsoft Excel compatible output from C#.

I used to write Office-based VBA systems, but it’s been a few years since I really needed to work with Excel. Even so, when a customer requested some Excel export features for one of my products, I focused on compiling the appropriate data and didn’t give the actual export process a lot of thought. Obviously, I was forgetting that built-in Office functions and macros always made moving data between applications much too easy.

I realised I had to get back up to speed, and thankfully there were still plenty of options.

Mistakes So Far

I’ve spent the last five weeks on Codesnipers writing about some of the mistakes I made when starting my company, and during the development and marketing of my products. I doubt they’ll be the last, and I’m sure I’ve already made a few more that I just haven’t identified yet, but I’m done for now.

So, to round off this batch (and in case you missed any), I decided to do a quick rundown of the mistakes series so far.

Micro ISV Mistake #5

This is the fifth and final instalment of my series on Micro ISV mistakes. If you missed any of my earlier mistakes, they are all still available here on CodeSnipers: #1, #2, #3, and #4.

Starting a business on your own or with a small number of people will be a delicate balancing act. It’s very difficult to stay focused on the things that matter, avoid the plentiful unnecessary distractions, and maintain your momentum. It gets even harder when you realise that it’s not obvious what matters and what can wait.

Mistake #5 is worrying about success.

Micro ISV Mistake #4

This is the fourth in a series of posts on common Micro ISV mistakes. I’ve been using the series as an opportunity to identify where I went wrong and figure out how to get back on track. I’m also hoping someone out there can learn from my mistakes and start out leaner, faster, and stronger.

Have you ever said “We”, when you meant “I”? Have you ever worried what would happen if a customer found out how few staff you actually have?

Mistake #4 is being “professional”.

Micro ISV Mistake #3

This is the third in a series of posts documenting mistakes I made over the last few years as I started my company, developed our products and tried to sell them online. The previous posts are still available if you missed them: Mistake #1, challenge from Keith, Mistake #2.

Of all the mistakes I had on my list when I started this series, I was dreading writing about this one the most. It doesn’t really lend itself well to a hard and fast rule, has a lot to do with timing, prioritisation, and moderation, and involves discouraging something that is undeniably important. Despite this, it has to be on the list, over the years it’s sucked away a lot of my time and energy, and you might need someone to tell you that you can take it too far.

Micro ISV Mistake #2

This is the second in a series of posts on common Micro ISV mistakes. Without repeating my entire introduction from the first article, these mistakes are based on lessons learned over the last few years as I started my company, developed our products, and then tried to sell them. Discussion is, as always, welcomed and encouraged in the comments.

Mistake #2 is trying to be all things to all people.

This is a very easy mistake to make. Even if you don’t consciously choose to make a general purpose product from the outset, it creeps up on you. You start with a simple idea, identify a neat little market, plan your development, and know exactly where you’re going. Then you spot another market which you could also serve with just a little extra development, or you decide that if you spent a little more time, you wouldn’t need to limit yourself to that niche; you could attack the entire market. Even if you don’t think of it yourself, someone, an advisor, friend, relative, customer, or potential sales partner, will suggest it to you. It can be seductive and can trick you into feeling like a genius, you’ve gone from a small market to a massive market and you’re just getting started. You’ve actually made a terrible mistake.

Micro ISV Mistake #1

I’ve decided to kick off my regular posting here on CodeSnipers with a short series on common Micro ISV mistakes. In making my initial list, I’ve stuck to mistakes I’ve made myself in the last few years. I’m not ruling out the possibility of adding to the list as the series and discussion goes on, but if that does happen I might be relying on observations, I’m not promising to test drive every mistake for you.

Some of you may argue that not all of my “mistakes” are really mistakes, and you might have a good point, but I firmly believe that in my situation each was the wrong thing to do, so I don’t have any qualms about calling any of them mistakes. If you do have a different perspective, I hope you’ll stay and discuss it in the comments.

Introducing Gavin

Hello everyone, and welcome to CodeSnipers. I'd like to start by saying how excited I am to be a part of this, and by thanking Keith for setting the whole thing up. I think this is going to be a lot of fun, I know I'm going to learn a lot by participating in the discussions and reading the posts of all the contributors. I already feel like I'm learning, and all I've done is a quick tour of the blog roll.

My name is Gavin Bowman, and I'm a software developer based in the north of England. While I was heavily into computing at an early age, it was mostly for the games, I didn't really do anything productive with them until I started work. My first job was a general trainee tech support role, but with the help of some great people, a flexible environment, and a lot of personal study time, I was able to spend most of my time catching and incubating the coding bug. When it was time to move on, an offer of some contract work on the side came as a happy coincidence, and without really thinking about it I'd gone it alone. Somehow I've managed to keep myself afloat ever since.

I tried forming a consulting/services company with a long term colleague in 2000, but it gradually morphed into a Micro ISV, and we have spent most of the last 3 years developing and selling our products online. Despite being a programmer first and foremost, I have to spend a large amount of my time on marketing, or trying to learn how to do marketing, and often need to dabble in web design and scripting. My early development adventures were in VB and VBA, but these days I work almost exclusively in C#. You probably shouldn't expect, or wish for, any malloc or vi tips from my posts.

What I think my posts will focus on is the Micro ISV life, occasional C#, and possibly my learning experiences with various web technologies and marketing techniques. I can't wait, and I hope you find something here that helps or entertains.