Category: Code

Jun

Considerations for storing Excel cell value in code

You may hate Excel, but you may find a discussion of how Excel stores cell values interesting. So I have a spreadsheet library. The biggest concern at the initial stage was how to store all the spreadsheet data efficiently. I hear people talking about millions of cells, so I’m scared. If my program stores a […]

Jun

File upload size limit in IIS

Yay file uploads. As if letting the users to type in stuff into the web application giving me SQL injection nightmares weren’t enough, now I have to let users upload files. Peachy. So during my investigations into the limits of file uploading, I found that I couldn’t upload a file more than 30MB on my […]

Feb

Specious spreadsheet security

If not for Chinese, it would’ve worked. So in Excel, you can set a password for either protecting a particular worksheet, or protecting the entire workbook/spreadsheet. This password is then hashed, and the result is stored within the spreadsheet contents. Now with the use of Open XML spreadsheets, this means the resulting hash is stored […]

Jan

SpreadsheetLight version 3

Version 3 of my spreadsheet library is now available. There’s a whole bunch of updates, including Excel 2010 conditional formatting such as data bars with negative value fill colours and icon sets with no icons. SpreadsheetLight is possibly the most developer-friendly spreadsheet library ever. Even if I do say so myself. 🙂

Nov

Modulo 26 and column names

I was sitting in the lecture theatre valiantly trying to keep awake. The professor was speaking on the rigorous application and proving of the modulus function. It’s basically the remainder, but I’ve never been introduced to it in such, uh, rigor. He brought up an example using modulo 26. And demonstrated the wrapping around of […]

Nov

Being a software god is tough

“Can this value be negative?” asked my colleague. We were in a meeting with a product manager to get project requirements. The software application was to calculate settlement revenue between our company and our company’s partners, who were content providers. We charge the public customers for the content, then we share the revenue with the […]

Nov

Calculate Excel column width pixel interval

Brace yourself. You’re about to learn the secret behind how Excel mysteriously calculates the column width intervals. In this article, I’m not going into the details of the column widths, but the column width intervals. There’s a difference. From the Open XML SDK specs: width = Truncate([{Number of Characters} * {Maximum Digit Width} + {5 […]

Oct

Blind libraries

I have discovered that the software I’m working on right now falls into a particularly interesting category. Pre-emptive note: I mean no disrespect for blind people or people with visual problems. There are software that are basically machine-machine. These software programs talk almost exclusively with other programs with nary a human interaction. Stock software, scheduled […]