XEROF

 

Reminder to ASP/ASP.NET users


Whenever you are willing to send an Excel in-memory file over internet, in your ASP/ASP.NET code, make sure to consider the following :

1) Ensuring proper buffer size is sent :

// fileBytes is our in-memory file, generated by xlsgen, ready to be sent over the wire

// C#
Response.ContentType = "application/vnd.ms-excel";
Response.AppendHeader("Content-Disposition", "attachment; filename=\\"sample.xls\\"");
Response.BinaryWrite(fileBytes);
Response.End();

// VB VB.NET
Response.ContentType = "application/vnd.ms-excel"
Response.AppendHeader("Content-Disposition", "attachment; filename=""sample.xls""")
Response.BinaryWrite(fileBytes)
Response.End


2) Ensuring proper content type tagging :

.XLS ==> application/vnd.ms-excel
.XLSX ==> application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
.XLSM ==> application/vnd.ms-excel.sheet.macroEnabled.12
.XLTX ==> application/vnd.openxmlformats-officedocument.spreadsheetml.template
.XLTM ==> application/vnd.ms-excel.template.macroEnabled.12
.XLAM ==> application/vnd.ms-excel.addin.macroEnabled.12

Posted on 01-August-2014 11:28 | Category: xlsgen, Excel generator | comment[0] | trackback[0]

 

 

<-- previous page

< August >
0102030405
0607080910
1112131415
1617181920
2122232425
2627282930
31



 

 

This site
Home
Articles

DevTools
CPU-Z
EditPlus
ExplorerXP
Kill.exe
OllyDbg
DependencyWalker
Process Explorer
autoruns.exe
Araxis
COM Trace injection
CodeStats
NetBrute
FileMon/Regmon
BoundsChecker
AQTime profiler
Source monitor
GDI leaks tracking
Rootkit revealer
Rootkit removal
RunAsLimitedUser(1)
RunAsLimitedUser(2)

 

 

Liens
Le Plan B
Un jour à Paris
Meneame
Rezo.net (aggr)
Reseau voltaire
Cuba solidarity project
Le grand soir
L'autre journal
Le courrier suisse
L'Orient, le jour
Agoravox (aggr)