LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Table Column Attribute

Solved!
Go to solution

Hi

 

I am creating a table in CVI 2009 at runtime by inserting columns with column labels.  Some columns are inserted as numeric format and some as string format.

 

The table is then populated from an Excel worksheet using "ExcelRpt_ReadDataToTableControl(...)". 

 

The problem is that the cells that are numeric format only show an integer value, it is rounding the value from the worksheet to an integer.

 

How can this be changed to display the actual value? 

 

I have used Excel 2003 and Excel 2007 with the same result.

 

Thanks

John

0 Kudos
Message 1 of 2
(3,207 Views)
Solution
Accepted by topic author johnswan

I found a solution to the problem.

After the table has been filled with data, I set the precision of the column using:

 

SetTableCellRangeAttribute (nPanelHandle, PANEL_TABLE, VAL_TABLE_COLUMN_RANGE(nColNum), ATTR_PRECISION, 4);

 

Hope this helps someone else.

0 Kudos
Message 2 of 2
(3,188 Views)