LabWindows/CVI

annulla
Visualizzazione dei risultati per 
Cerca invece 
Intendevi dire: 

Table Column Attribute

Risolto!
Vai alla soluzione

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
Messaggio 1 di 2
3.499Visualizzazioni
Soluzione
Accettato da autore argomento 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
Messaggio 2 di 2
3.480Visualizzazioni