2.7.20 expXLS


Menu Information

File: Export: Excel

Brief Information

Export Workbook to Excel

Additional Information

Minimum Origin Version Required: 2023b

Command Line Usage

1. expXLS path:="C:\Users\AAA\Documents\OriginLab\User Files" overwrite:=1 sheets:=whole cellfmts:=1;

2. expXLS name:="<sheet name>" path:="<User Files Folder>";

X-Function Execution Options

Please refer to the page for additional option switches when accessing the x-function from script

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
iwp

Input

WorksheetPage

<active>
Specify the input workbook where the worksheet(s) you want to exported exists. By default, current workbook will be selected.
File Name name

Input

string

<long name>
Specify the output file name. Keywords like <sheet name> and <PE parent1> (refers to the immediate parent folder name) are supported.
File Path path

Input

string

path$
Specify the output file path. Keywords like <User Files Folder> and <Project Folder><PE Path> (refers to the subfolder under project folder, the subfolder structure is the same as the one in Project Explorer) are supported
Overwrite Existing overwrite

Input

int

0
Specify whether to overwrite existing file: 0=do not overwrite, the exporting file will be auto-renamed; 1=replace the existing file.
Export Sheets sheets

Input

int

0
Specify the worksheets you want to export.

Option list:

  • 0 = active:Active Sheet Only
    Only current activated sheet will be exported.
  • 1 = whole:Whole Book
    Current whole workbook will be exported, minus excluded sheets and report sheets. Exclude sheets by right-clicking on the sheet tab and choosing Exclude from Excel Export.
Export Cell Formats cellfmts

Input

int

0
Specify whether to export the Excel with cell format: 0=false, 1=true.

Description

This X-Function can be used to export current workbook or specified worksheet(s) as an Excel file.

Related X-Functions

expASC, expExcel