wkhtmltopdf and wkhtmltoimage are open source (LGPLv3) command line tools to renderHTML into PDF and various image formats using the Qt WebKit rendering engine. These run entirely "headless" and do not require a display or display service. There is also a C library, if you're into that kind of thing. The file pdf.h contains a fairly high level and stable pure c binding to wkhtmltopdf. These binding are well documented and do not depend on QT.
You want to render an Excel file inside web browsers and allow users to edit information in cells... Workbook Tag has been designed to simplify this scenario. MSOffice is not required ! Ajax interact with server (Excel, Editor, Tag, HTML Converter, JSP)