Browsed by
Author: Eric Oszakiewski

Calculating Nth weekday of next month in Excel

Calculating Nth weekday of next month in Excel

I won’t normally post Excel stuff on here, but while researching an XSLT/Javascript function I was determined to get it right in Excel first, so I understood it better, and definitely wanted to document it so I could pull it back up later! In this example, I need to know the second Wednesday of next month, because that’s when server maintenance is every month. But what day is it? Here’s the Excel formula: =DATE(YEAR(TODAY()),MONTH(TODAY())+1,1+7*2)-WEEKDAY(DATE(YEAR(TODAY(),MONTH(TODAY())+1,8-4)) Notice the DAY argument of the…

Read More Read More

InfoPath data validation using regular expressions

InfoPath data validation using regular expressions

I found it interesting yesterday, while building an InfoPath template for SharePoint 2007, that you can use regular expression code to perform data validation the same way it’s used in an ASP.Net form, and the same way it’s done in C#. Here’s an example: In my form, I wanted to make sure the data entered conformed to a specific email address format. Normally, an email address pattern looks like this: w+([-+.’]w+)*@w+([-.]w+)*.w+([-.]w+)* This won’t work in InfoPath, there are too many…

Read More Read More

Complete TFS 2008 Install Guide

Complete TFS 2008 Install Guide

I wanted to use Team Foundation Server 2008 as our development solution for our company, and I had never used it before, so I thought I’d give it a whirl on a VM dev box and see how it goes. I tried opening the Installation Guide, and it didn’t work. I tried opening the one online, and it forced me to download a copy that also didn’t work. So, flying blind I gave it my best shot. After over a…

Read More Read More

WSS 2.0 error when adding new users to a site

WSS 2.0 error when adding new users to a site

Yeah, I know, they’re still running WSS 2.0. I’m just here to help, not judge. = ) So I get the request (and I got it before and forgot how I did it) from a site admin that they can’t add a user to their new website they created. It says they already exist when clearly they do not in the Manage Users screen. This is generally because the SID of the existing user account doesn’t match the SID of…

Read More Read More

Import an Excel 2007 spreadsheet into a GridView in ASP.Net

Import an Excel 2007 spreadsheet into a GridView in ASP.Net

I had a request earlier today for an existing web-based solution written in C# ASP.Net 2.0 to be able to upload an Excel 2007 spreadsheet and have the site immediately read from that file and put the results into a GridView control on the same page for editing, review, etc. I had never done this before, all of my data access was typically SQL, Access, XML, etc. So I did some light research and ended up writing the following code…

Read More Read More