DataObject::SetDataFormat

It is recommended that you switch to the originpro package. PyOrigin is primarily for users who need to work with Origin version prior to 2021.

 

Description

Set DataFormat property of one DataObject

Syntax

SetDataFormat(value)

Parameters

value

the code for format.

0: Numeric
1: Text
2: Time
3: Date
9: Text and Numeric

Return

None

Examples

import PyOrigin
wks=PyOrigin.WorksheetPages('Book1').Layers(0)
Col_0=wks.Columns(0)
Col_0.SetDataFormat(1)
if Col_0.GetDataFormat()==0:
    print('Numeric')
elif Col_0.GetDataFormat()==1:
     print('Text')
elif Col_0.GetDataFormat()==2:
     print('Date')

See Also

DataObject::GetDataFormat