# XLSWRITEFIG
Write a MATLAB figure to an Excel spreadsheet
## Syntax
```
xlswritefig(hFig, filename, sheetname, xlcell)
```
## Input Arguments
All inputs are optional:
| Name | Description |
| --- | --- |
| hFig | Handle to MATLAB figure. If empty, current figure is exported |
| filename | (string) Name of Excel file, including extension. If not specified, contents will be opened in a new Excel spreadsheet. |
| sheetname | Name of sheet to write data to. The default is 'Sheet1'. If specified, a sheet with the specified name must exist. |
| xlcell | Designation of cell to indicate the upper-left corner of the figure (e.g. 'D2'). Default = 'A1' |
## Requirements
- Must have Microsoft Excel installed.
- Microsoft Windows only.
## Examples
Paste the current figure into a new Excel spreadsheet which is left open.
```
plot(rand(10,1))
xlswritefig
```
Specify all options.
```
hFig = figure;
surf(peaks)
xlswritefig(hFig,'MyNewFile.xlsx','Sheet2','D4')
winopen('MyNewFile.xlsx')
```
[![View xlswritefig on File Exchange](https://www.mathworks.com/matlabcentral/images/matlab-file-exchange.svg)](https://www.mathworks.com/matlabcentral/fileexchange/24424-xlswritefig)
MATLAB设计_将MATLAB图形写入Excel电子表格.zip
版权申诉
55 浏览量
2024-02-17
15:53:20
上传
评论
收藏 4KB ZIP 举报
Nowl
- 粉丝: 1w+
- 资源: 3643
最新资源
- 使用C语言与python分别实现文件的读写功能
- zephyr sdk package 2
- zephyr sdk package 1
- optimization.ipynb
- 数据库标识码BSM重排序工具、重构标识码工具
- 基于C语言的校园导航系统报告.doc
- __init__.py
- tensorflow-gpu-2.6.5-cp39-cp39-manylinux2010-x86-64.whl
- tensorflow-rocm-2.13.1.600-cp38-cp38-manylinux2014-x86-64.whl
- tensorflow-rocm-2.13.0.570-cp311-cp311-manylinux2014-x86-64.whl
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈