OriginPro
 
Loading...
Searching...
No Matches
originpro.imp Namespace Reference

Functions

Union[WSheet, MSheetget_sheet (index=0, _type=_WBOOK_TYPE)
 
def prepare_range (objs_count, sheet_index=0)
 

Detailed Description

originpro
A package for interacting with Origin software via Python.
Copyright (c) 2020 OriginLab Corporation

Function Documentation

◆ get_sheet()

Union[WSheet, MSheet] originpro.imp.get_sheet (   index = 0,
  _type = _WBOOK_TYPE 
)
This is for importing into multiple sheets, to get the needed sheet by index.
For exmaple a file with multiple blocks.

Parameters:
    index(int): sheet index in a multisheet group, 0,1,2
    type (str): Specify 'w' for WBook object or 'm' for MBook object
Returns:
    (WSheet or MSheet or None)

Examples:
    wks1 = op.imp.get_sheet()   #when active book that is a workbook
    wks2 = op.imp.get_sheet(1)

◆ prepare_range()

def originpro.imp.prepare_range (   objs_count,
  sheet_index = 0 
)
Prepare column ranges for Connector import
Parameters:
    objs_count(int):
    sheet_index(int):
Returns:
    the first column index in column range
Examples:
    op.imp.prepare_range(3,0) #This function must be used with the
                              #COConnMultipleSheetsMonitorBase class