File: Export: Excel
Export Workbook to Excel
Minimum Origin Version Required: 2023b
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>";
Please refer to the page for additional option switches when accessing the x-function from script
Display Name |
Variable Name |
I/O and Type |
Default Value |
Description |
---|---|---|---|---|
iwp |
Input WorksheetPage |
|
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 |
|
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 |
|
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 |
|
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 |
|
Specify the worksheets you want to export.
Option list:
|
Export Cell Formats | cellfmts |
Input int |
|
Specify whether to export the Excel with cell format: 0=false, 1=true. |
This X-Function can be used to export current workbook or specified worksheet(s) as an Excel file.