<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: format a table cell in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/format-a-table-cell/m-p/2671865#M65722</link>
    <description>Not tested&lt;BR /&gt;
&lt;BR /&gt;
{code}&lt;BR /&gt;
myTable.Cells(r, c).DataFormat = "%lu2%pr3%"&lt;BR /&gt;
{code}&lt;BR /&gt;
&lt;BR /&gt;
~'J'~</description>
    <pubDate>Fri, 23 Apr 2010 08:19:55 GMT</pubDate>
    <dc:creator>Hallex</dc:creator>
    <dc:date>2010-04-23T08:19:55Z</dc:date>
    <item>
      <title>format a table cell</title>
      <link>https://forums.autodesk.com/t5/net-forum/format-a-table-cell/m-p/2671864#M65721</link>
      <description>How do you format cells in a table to show numbers as 3-digit decimals?&lt;BR /&gt;
I've tried this...&lt;BR /&gt;
&lt;BR /&gt;
   myTable.Cells(r, c).DataFormat = "#0.000"       ' this does not work.&lt;BR /&gt;
&lt;BR /&gt;
Is there more to it than this?&lt;BR /&gt;
&lt;BR /&gt;
Allen</description>
      <pubDate>Thu, 22 Apr 2010 20:22:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/format-a-table-cell/m-p/2671864#M65721</guid>
      <dc:creator>Allen_Hart</dc:creator>
      <dc:date>2010-04-22T20:22:36Z</dc:date>
    </item>
    <item>
      <title>Re: format a table cell</title>
      <link>https://forums.autodesk.com/t5/net-forum/format-a-table-cell/m-p/2671865#M65722</link>
      <description>Not tested&lt;BR /&gt;
&lt;BR /&gt;
{code}&lt;BR /&gt;
myTable.Cells(r, c).DataFormat = "%lu2%pr3%"&lt;BR /&gt;
{code}&lt;BR /&gt;
&lt;BR /&gt;
~'J'~</description>
      <pubDate>Fri, 23 Apr 2010 08:19:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/format-a-table-cell/m-p/2671865#M65722</guid>
      <dc:creator>Hallex</dc:creator>
      <dc:date>2010-04-23T08:19:55Z</dc:date>
    </item>
    <item>
      <title>Re: format a table cell</title>
      <link>https://forums.autodesk.com/t5/net-forum/format-a-table-cell/m-p/2671866#M65723</link>
      <description>Thanks for the idea, but it does not work either.&lt;BR /&gt;
There must be some special setup required prior to the assignment statement, but I can't find it. &lt;BR /&gt;
Any other ideas?&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Allen</description>
      <pubDate>Mon, 26 Apr 2010 12:59:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/format-a-table-cell/m-p/2671866#M65723</guid>
      <dc:creator>Allen_Hart</dc:creator>
      <dc:date>2010-04-26T12:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: format a table cell</title>
      <link>https://forums.autodesk.com/t5/net-forum/format-a-table-cell/m-p/2671867#M65724</link>
      <description>This code is working for me&lt;BR /&gt;
just need to set DataType before:&lt;BR /&gt;
{code}&lt;BR /&gt;
                            oTable.SetDataType(i, j, DataType.Double, UnitType.Distance);&lt;BR /&gt;
                            oTable.SetDataFormat(i, j, "%lu2%pr3");&lt;BR /&gt;
{code}&lt;BR /&gt;
&lt;BR /&gt;
~'J'~</description>
      <pubDate>Tue, 27 Apr 2010 19:24:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/format-a-table-cell/m-p/2671867#M65724</guid>
      <dc:creator>Hallex</dc:creator>
      <dc:date>2010-04-27T19:24:45Z</dc:date>
    </item>
    <item>
      <title>Re: format a table cell</title>
      <link>https://forums.autodesk.com/t5/net-forum/format-a-table-cell/m-p/2671868#M65725</link>
      <description>Here is what I have now, which works OK.&lt;BR /&gt;
&lt;BR /&gt;
{code}&lt;BR /&gt;
Dim oDTP As New DataTypeParameter&lt;BR /&gt;
oDTP.DataType = DataType.Double&lt;BR /&gt;
oDTP.UnitType = UnitType.Unitless&lt;BR /&gt;
&lt;BR /&gt;
'oTable.SetDataType(r, c, DataType.Double, UnitType.Distance)   'obsolete&lt;BR /&gt;
'oTable.SetDataFormat(r, c, "%lu2%pr3%")    'obsolete&lt;BR /&gt;
&lt;BR /&gt;
 oTable.Cells(r, c).DataType = oDTP&lt;BR /&gt;
 oTable.Cells(r, c).DataFormat = "%lu2%pr3%"&lt;BR /&gt;
{code}&lt;BR /&gt;
&lt;BR /&gt;
If I assign a value to the cell like this:&lt;BR /&gt;
  oTable.Cells(r, c).Value = 1.0&lt;BR /&gt;
it will ignore the format and display the number in 6 decimals.&lt;BR /&gt;
&lt;BR /&gt;
Is there a list somewhere of defined dataformat strings?&lt;BR /&gt;
&lt;BR /&gt;
Thanks for all your help.&lt;BR /&gt;
Allen</description>
      <pubDate>Wed, 28 Apr 2010 13:48:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/format-a-table-cell/m-p/2671868#M65725</guid>
      <dc:creator>Allen_Hart</dc:creator>
      <dc:date>2010-04-28T13:48:47Z</dc:date>
    </item>
    <item>
      <title>Re: format a table cell</title>
      <link>https://forums.autodesk.com/t5/net-forum/format-a-table-cell/m-p/2671869#M65726</link>
      <description>I'm still using A2008/Visual Studio2005&lt;BR /&gt;
so it's not obsolete for me&lt;BR /&gt;
Glad you have solved by yourself&lt;BR /&gt;
&lt;BR /&gt;
~'J'~</description>
      <pubDate>Wed, 28 Apr 2010 14:04:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/format-a-table-cell/m-p/2671869#M65726</guid>
      <dc:creator>Hallex</dc:creator>
      <dc:date>2010-04-28T14:04:49Z</dc:date>
    </item>
    <item>
      <title>Re: format a table cell</title>
      <link>https://forums.autodesk.com/t5/net-forum/format-a-table-cell/m-p/2671870#M65727</link>
      <description>[SOLVED]&lt;BR /&gt;
&lt;BR /&gt;
{quote}&lt;BR /&gt;
If I assign a value to the cell like this:&lt;BR /&gt;
oTable.Cells(r, c).Value = 1.0&lt;BR /&gt;
it will ignore the format and display the number in 6 decimals.&lt;BR /&gt;
{quote}&lt;BR /&gt;
&lt;BR /&gt;
{code}oTable.Cells(r, c).DataFormat ="%lu2%pr2%th44" '&amp;lt;-- double with 2 decimals, %th44 = dot separated{code}&lt;BR /&gt;
&lt;BR /&gt;
Works like a sharm&lt;BR /&gt;
&lt;BR /&gt;
~'J'~</description>
      <pubDate>Mon, 03 May 2010 19:30:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/format-a-table-cell/m-p/2671870#M65727</guid>
      <dc:creator>Hallex</dc:creator>
      <dc:date>2010-05-03T19:30:56Z</dc:date>
    </item>
    <item>
      <title>Re: format a table cell</title>
      <link>https://forums.autodesk.com/t5/net-forum/format-a-table-cell/m-p/3381697#M65728</link>
      <description>&lt;P&gt;How to set data type to TEXT and format to Uppercase? Please help. Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 22 Mar 2012 16:17:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/format-a-table-cell/m-p/3381697#M65728</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-03-22T16:17:01Z</dc:date>
    </item>
  </channel>
</rss>

