Writing Data From .Net to Excel Interrupted by User Opening Excel Window

Problem I have an application that generates financial reports in excel. After installing Office 2013, if a user opens excel while the application is running, the application returns a error: System.Runtime.InteropServices.COMException with HRESULT: 0x800AC472 which interrupts the data from being written to the spreadsheet. After some research according to Microsoft this was done by design, the … More Writing Data From .Net to Excel Interrupted by User Opening Excel Window

OAuth2 – Get an Access Token – C#

What is OAuth2? OAuth 2.0 is the industry-standard protocol for authorization. OAuth 2.0 supersedes the work done on the original OAuth protocol created in 2006. OAuth 2.0 focuses on client developer simplicity while providing specific authorization flows for web applications, desktop applications, mobile phones, and living room devices. reference: https://oauth.net/2/ Who uses OAuth2? Among them … More OAuth2 – Get an Access Token – C#

Refactoring I -Convert Linq Anonymous Types to List

Refactoring is an important process to crafting readable and maintainable code. Functions should follow  the single responsibility principle – a function should do one thing and one thing only and should have few lines of code. Like with everything, you should apply this with measure and wisdom. I was asked to write a function that … More Refactoring I -Convert Linq Anonymous Types to List

Transact-SQL Server – Transposing a table

The Problem A client sent me an excel sheet with financial information classified in columns where each column header was a date and the values associated with that date were listed below I needed to insert the information to a normalized table with the following columns: Client Account EntryDate Value The Solution Step 1 Loaded … More Transact-SQL Server – Transposing a table

Books every software developer should read in 2016 – if you have not done so

The obligatory reflection on what have we accomplished in 2015 … always a sticky question. But if keep it to my book, training and research, it does not look that bad, I managed to keep the momentum going. Software Development Cracking the coding Interview – Gayle Laakman This is a great book with brain teasers and … More Books every software developer should read in 2016 – if you have not done so