Hardly had I arrived at the office ( ) it started to rain.

Hardly … when/beforeで「~するとすぐに…」という意味になる(thanはNo soonerの場合)。