【GH】【EXCEL】bumblebee简介:GH↔EXCEL

bumblebee

address

https://www.interop.xyz/post/bumblebee

https://www.food4rhino.com/en/app/bumblebee

https://github.com/interopxyz/Bumblebee/blob/main/Bumblebee/Components/Worksheets/GH_Ex_Wks_Edit.cs

image-20240818233901334

Bumblebee is an interoperability library for Microsoft Excel and Grasshopper.

Component

  1. Analysis

    1. Sparkcolumn (迷你柱形图)
    2. Sparkline (迷你折线图)
    3. Conditional Average (条件平均值)
    4. Conditional Bar (条件柱状图)
    5. Conditional Between (条件区间)
    6. Conditional Blank (条件空白)
    7. Conditional Scale (条件刻度)
    8. Conditional Top Count (条件最高计数)
    9. Conditional Top Percent (条件最高百分比)
    10. Conditional Unique (条件唯一值)
    11. Conditional Value (条件值)
  2. App

    1. ExcelAppli cati on
  3. Cell

    1. Cell Address (单元格地址)
    2. Cell Location (单元格位置)
    3. Generate Addresses (生成地址)
    4. Range Addresses (范围地址)
  4. Charting

    1. Bar Chart (条形图)
    2. Column Chart (柱状图)
    3. Line Chart (折线图)
    4. Radial Chart (径向图)
    5. Scatter Chart (散点图)
    6. Surface Chart (曲面图)
    7. Chart Decorators (图表装饰器)
    8. Chart Graphics (图表图形)
  5. Data

    1. Compile Column (编译列)
    2. Compile Row (编译行)
    3. Fast Write Data (快速写入数据)
    4. Write Data (写入数据)
    5. Read Data (读取数据)
  6. Graphics

    1. Get Range Color (获取范围颜色)
    2. Range Color (设置范围颜色)
    3. Get Range Border (获取范围边框)
    4. Range Border (设置范围边框)
    5. Get Range Font (获取范围字体)
    6. Range Font (设置范围字体)
  7. Range

    1. Clear Range (清除范围)
    2. Resize Cell (调整单元格大小)
    3. Active Range (活动范围)
    4. Pixel Range (像素范围)
    5. Range Extents (范围扩展)
    6. Sub Ranges (子范围)
    7. Range Merge (合并范围)
    8. Range UnMerge (取消合并范围)
  8. Shapes

    1. Picture (图片)
    2. XL Button (Excel按钮)
    3. XL Check Box (Excel复选框)
    4. XL Dropdown (Excel下拉列表)
    5. XL Label (Excel标签)
    6. XL List Box (Excel列表框)
    7. XL Scroller (Excel滚动条)
    8. XL Spinner (Excel微调控件)
    9. XL Arrow (Excel箭头)
    10. XL Figure (Excel图形)
    11. XL Flow Chart (Excel流程图)
    12. XL Geometry (Excel几何图形)
    13. XL Line (Excel线条)
    14. XL Star (Excel星形)
    15. XL Symbol (Excel符号)
    16. Shape Graphics (形状图形)
  9. Workbooks

    1. Get Workbook (获取工作簿)
    2. Get Workbooks (获取工作簿集)
    3. Activate Workbook (激活工作簿)
    4. Add Macro (添加宏)
    5. Run Macro (运行宏)
    6. Load Workbook (加载工作簿)
    7. Save Workbook (保存工作簿)
  10. Worksheets

    1. Get Worksheet (获取工作表)
    2. Get Worksheets (获取工作表集)
    3. Activate Worksheet (激活工作表)
    4. Edit Worksheet (编辑工作表)
    5. Freeze Worksheet (冻结工作表)
    6. Live Worksheet (实时工作表)

Sample: Accessing_Excel

image-20240818215755656

Excel Application

Returns the Excel Application object.
If an active session of Excel is open, it is returned.
If there is no session of Excel it is created.

Excel Application

image-20240818230758385

  • Input parameters:
    • _A (Boolean) If true, the component will be activated
  • Output parameters:
    • App (Generic Data) An Excel Application Object

Workbook

Save Workbook (Create)

To create a workbook with a specific name, the workbook must first be saved.

image-20240818224142954

Save Workbook

image-20240818230650770

  • Input parameters:
    • Wbk (Generic Data) A Worksheet, Workbook, Range Object, Excel Application, or Text Workbook Name
    • F (Text) The 'f’older path to the workbook
    • N (Text) The Workbook 'n’ame
    • E (Integer) The file type 'e’xtension (xlxs, xlxm)
    • _A (Boolean) If true, the component will be activated
  • Output parameters:
    • Wbk (Generic Data) An Excel Workbook Object
    • P (Text) The 'full 'file 'p’ath to the saved file
Get All Workbooks from App

image-20240818224855085

Get Workbooks

image-20240818230934927

Gets all the currently active workbooks

Input parameters:
App (Generic Data) A Worksheet, Workbook, Range Object, Excel Application, or Text Workbook Name

Output parameters:
Wbk (Generic Data) Excel Workbook Objects

image-20240818225013073

Get Workbook by Name

Get Workbook


Get a Workbook by name or the active Workbook

image-20240818231347254


Input parameters:
Excel Application (Generic Data) A Worksheet, Workbook, Range Object, Excel Application, or Text Workbook Name Name (Generic Data) The name of an active Workbook

Output parameters:
Workbook (Generic Data) A Worksheet, Workbook, Range Object, Excel Application, or Text Workbook Name

Get Workbook can be used to get a specific workbook by name.

image-20240818225034298

If no application is provided, a new call will be made to the active instance of Excel.

image-20240818225234038

Get Active Workbook from App

The component can also return the active workbook if no name is provided.

image-20240818225101780

If no inputs are provided, the component will return the active Workbook.

image-20240818225252472

Worksheet

Get Active Worksheet’s’ from App / Workbook / all
  • Get All Worksheets can get all the worksheets in the ‘topmost’ Workbook of an Excel app.
  • If a Workbook is provided as the input all the worksheets in that workbook will be returned.
  • If no input is provided it will return all the worksheets in the topmost Workbook.

Get Worksheets


Gets all the worksheets in a workbook or application

image-20240818233145715


Input parameters:
Workbook (Generic Data) A Worksheet, Workbook, Range Object, Excel Application, or Text Workbook Name

Output parameters:
Worksheet (Generic Data) Excel Worksheet Objects

image-20240818231818425

Get Worksheet by Name from Workbook,Active Workbook, by Name,Active Worksheet

Get Worksheet


Get a worksheet by name or the active worksheet from a workbook or application

image-20240818232109690


Input parameters:
Workbook (Generic Data) A Worksheet, Workbook, Range Object, Excel Application, or Text Workbook Name Name (Generic Data) The name of an active Worksheet

Output parameters:
Worksheet (Generic Data) An Excel Worksheet Object

  • If Get Worksheet has a name input that does not exist in the current Workbook, it will be added.
  • If no name is provided the topmost Worksheet will be returned.
  • If no Workbook is provided, the active workbook will be used.
  • If no Workbook and Worksheet Name are provided, the active worksheet will be used.

image-20240818232318483

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

hmywillstronger

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值