Thought I'd dust the cobwebs off my blog by sharing something I came across today...
I came across an issue where a user reported that a web application was not opening Excel content they were requesting.
Basically the application was sending csv formatted text to the browser and the browser (Internet Explorer) was supposed to open this with Microsoft Excel 2010.
template sending the content had the correct headers configured to
instruct the browser to open this in Microsoft Excel and the content was
valid but for some reason the new window was failing silently without
promting the user to open \ save the file. The only clue was that this was a new PC with Windows 7 and Internet Explorer 8 installed and their previous PC worked fine.
I decided to check with Firefox and voila - I was prompted to Open / Save the file.
So after diagnosing different scenarios through the code I then started
looking into the settings on the PC for Internet Explorer.
I was working with a 3rd Party file service \ handling provider and came across an issue whereby when I uploaded a Microsoft Office 2007+ document the "detected MIME type" was being returned as "application/zip".
Turns out there's an easy enough fix for this for their servers. Simply update the web server to include the new \ incorrect MIME types.
I've come across this before but have never thought to blog about it,
simply because it was quite an easy implementation in the end-up.
If you're exporting data from an HTML table to an Excel workbook,
then the following will save you some time when trying to get Microsoft
Excel to format the data. and display it as you desire.
Using Microsofts own Office XML format, you can style \ format the
cell data using "CSS like" syntax.
For example, if you wish to format a date column, you can simply add a
style attribute with the content style='mso-number-format:"mm\/dd\/yyyy"'.
This format is pretty self explanatory, but will format a given date in
the format "10/01/2011" for 10th January 2011.
If you're a stickler for seperation, like I am, you can take this
further by defining CSS Rules in a stylesheet and specifying the class
name in your HTML elements.
I came across a funny issue today with Microsoft Excel and thought I should blog it as the resolution wasn't that obvious.
I was working pushing some content from a Web Application to Microsoft Excel when I got the following error message.
If you ever require resources, both online and offline, for creating, collaborating on and distributing presentations, here is a roundup of some of the resources available which allow you to do so. The objective of this blog post is more for awareness rather than actually detailing the usage of each option outlined below. I am also not advocating any particular solution. They are all great and have their own specific features which may appeal to different users, so the choice is completly yours. I would advise you to check them all out though!