September 2009 Entries

Connecting to Excel with ADO.NET Useful Links

Thought I would put this up here for future reference. #1 Helped me figure out how to retrieve a region within an excel sheet instead of the whole sheet. I didn’t know you could do things like “SELECT * FROM [Sheet1$A1:B10]” which will only retrieve the values with those rows and columns. You can also retrieve data inside named ranges. If you want to be able to figure out the name of the first worksheet, then have a look at link #2. You have to get it out of the database schema. Very useful....

testing syntax highlighter

Arnold Matusz’s created a great live writer plugin that uses the excellent syntax highlighter from Alex Gorbatchev. Great Stuff!! sample: public object Lookup(string tblName, string returnField, string where) { SqlCommand s = new SqlCommand(); s.Connection = conn; s.CommandText = "SELECT " + returnField + " FROM " + tblName...

Export gridview as excel & subsequent troubles

I was trying to write a simple application the other day that exported data from sql server to excel for the user to edit it and then import the updated excel back into sql server. There’s lot of help online about how to export gridview to excel. Here’s what I came up after looking at various examples: Protected Sub exportExcel() 'Clear the response, and set the content type and mark as attachment HttpContext.Current.Response.Clear() ...

bad indian veg restaurant

On Saturday, went to dinner at kalachandji’s. they’ve been around for about 27 years or so, but wow, the food was terrible. It really wasn’t Indian at all, just a lot of vegetables sliced and diced and mixed together. None of the food had any flavor or taste. I heard a lot of people seem to like it though. It definitely wasn’t the traditional Indian restaurant food that I was expecting. I advise you to stay away if you are in the mood for real Indian food. The setting was gorgeous though. The open sky, big tree in the middle...

testing blog publish from live writer

live writer is pretty neat. tons of features and nice plug-in support.   one two three four ...