Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi all,
I have made a web site where I produce report data to be (optionally) viewed in Excel at the client computer. This is how I do it i Visual Basic (Studio 2005, .NET 2.0) (extract) at the web server (in the *.aspx.vb file): Dim delimiter As Char = vbTab Response.Clear() Response.Cache.SetCacheability(HttpCacheability.No Cache) Response.AppendHeader("content-disposition", "inline;filename=report.xls") Response.ContentType = "application/ms-excel" Dim lstrbReportData As StringBuilder = GetTheData(delimiter) Response.Write(lstrbReportData.ToString ) Response.End() Response.Close() This works fine EXCEPT that Excel will do data conversions. E.g. leading zeroes are removed, values may be converted to dates etc. Is there a way I can tell Excel to treat all data as plain text, similar to when I manually import a text file to excel, where I can set all columns to Text format instead of General? Some Response.appendheader maybe? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel considers my formulas as plain text | Excel Worksheet Functions | |||
Import word file into excel as plain text | Excel Discussion (Misc queries) | |||
Copying Data from Excel to MS Outlook in Plain Text Mode | Excel Worksheet Functions | |||
Import plain text with formulas into Excel | Excel Discussion (Misc queries) | |||
How do I export data from Excel into an ODBC client / or plain tex | Excel Discussion (Misc queries) |