请选择 进入手机版 | 继续访问电脑版
搜索
专业IC版图外包服务 微信:drclvs
广告位:SY02 广告业务联系QQ:3173974412
无锡芯满微电子有限公司---专业研发电机驱动芯片
IC设计论坛----ictown.com
广告位:SY05 广告业务联系QQ:3173974412
查看: 689|回复: 6

[转帖] Allegro 16.6 支持处理Excel表格,範例代碼

[复制链接]

19

主题

20

帖子

310

E币

技术员

Rank: 2

积分
39
发表于 2017-12-15 22:30:48 | 显示全部楼层 |阅读模式
Allegro 16.6 支持处理Excel表格,範例代碼
  1. procedure( spreadsheetExample()
  2.     ; Initialize an empty spreadsheet.
  3.     ; Note that you do not need to provide a name until you
  4.     ; wish to write the spreadsheet to disk.
  5.     axlSpreadsheetInit()

  6.     ; Define inital, default style.
  7.     ; Styles may be defined at any point during the spreadsheet's
  8.     ; construction, but must be defined before they are referenced
  9.     ; by any row, column, or cell.
  10.     axlSpreadsheetSetStyle("Default" nil)
  11.     axlSpreadsheetSetStyleProp("Alignment" "Vertical" "Top")
  12.     axlSpreadsheetSetStyleProp("Alignment" "Horizontal" "Left")
  13.     axlSpreadsheetSetStyleProp("Alignment" "WrapText" "1")

  14.     ; Define a second style, derived from the Default style, which
  15.     ; will include a thin border outline and specifies a red
  16.     ; background fill.
  17.     axlSpreadsheetSetStyle("Red" "Red Cell")
  18.     axlSpreadsheetSetStyleParent("Default")
  19.     axlSpreadsheetSetStyleBorder("Left" nil "Continuous" "2")
  20.     axlSpreadsheetSetStyleBorder("Right" nil "Continuous" "2")
  21.     axlSpreadsheetSetStyleBorder("Top" nil "Continuous" "2")
  22.     axlSpreadsheetSetStyleBorder("Bottom" nil "Continuous" "2")
  23.     axlSpreadsheetSetStyleProp("Fill" "Color"
  24.     axlSpreadsheetGetRGBColorString(255 0 0))
  25.     axlSpreadsheetSetStyleProp("Fill" "Pattern" "Solid")

  26.     ; Define the first worksheet in the spreadsheet.
  27.     axlSpreadsheetSetWorksheet("First")

  28.     ; With a wider first column
  29.     axlSpreadsheetSetColumnProp(1 "Width" "500")
  30.     axlSpreadsheetDefineCell(1 1 "Default" "String" "Default formatted cell")
  31.     axlSpreadsheetDefineCell(1 2 "Red" "String" "Red background cell")

  32.     ; Write the compiled spreadsheet to XML file on disk.
  33.     axlSpreadsheetWrite("spreadsheet.xml")

  34.     ; Close and release the compiled spreadsheet's data.
  35.     axlSpreadsheetClose()
  36. )
复制代码


积分规则
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则



版权所有:EDABOSS论坛 投诉受理:13816911948 合作热线:13816911948

备案信息:苏经营性ICP B2-20090218号 皖ICP备09697823号 电子公告服务许可文件号:皖通[2009]556号

Powered by EDABOSS X3.4 Tamplate By EDABOSS论坛  © 2001-2013 Comsenz Inc.

广告投放 微信:drclvs

快速回复 返回顶部 返回列表