Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
C#, OWC10 and forcing formatting on columns.
Instead of a trailing space, try a leading single quote (ascii 39).
-- "Diggler" wrote in message ... I am looking for the proper way to force formats on a columns when streaming an Excel spreadsheet to the browser based on a DataTable. I am using Asp.Net with C#. Data source is from SQL Server 2000. One column that I am having problems with has a varchar data format in the database; it has code numbers like: 595-1 595-9 595-17 etc. When this shows up in Excel using OWC10, the data that is in the format ###-## shows up properly, but the data that is in the format ###-# gets converted somehow to a number. For example, 595-1 gets transformed in Excel to -476639. Why is this, and how can I get this data to be treated as the string value "595-1"? I can 'hack' it by adding a space after the value, like "595-1 " but I'd rather have the clean data with no extraneous whitespace. I don't understand why this is happening for some values and not others? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Forcing the display of new custom formatting | Excel Discussion (Misc queries) | |||
owc10 pivotchart save in c# windows forms of vs.net | Charts and Charting in Excel | |||
Forcing Columns to Next Page | Excel Discussion (Misc queries) | |||
Live chart on Userform Printing OWC10 | Excel Programming | |||
OWC10, XMLSS and Excel97? | Excel Programming |