MaxScript读取excel数据
本文最后更新于510 天前,其中的信息可能已经过时,如有错误请发送邮件到84581927@qq.com

— Generate a filename
excelFile = “C:\\test.xls

— Start an Excel OLE Object

x = CreateOLEObject “Excel.Application

— Create a new workbook in the new excel document

x.application.Workbooks.Add

— Give the active sheet a name (“Test
x.ActiveSheet.Name = “Test”

— This makes Excel Visible
x.visible = true

— Put some content into Cell A1
(x.application.Range(“A1”)).value = “This is Cell A1”

— Change the color of A1:B1 to red
(x.application.Range(“A1:B1”)).Interior.ColorIndex = 45

— Save the spreadsheet
x.application.ActiveWorkbook.SaveAs(excelFile)

— Close the spreadsheet
x.application.ActiveWorkbook.Close

— quit excel
x.quit()

— Release the OLE Object
releaseOLEObject x

— Release ALL OLE Objects, just incase
releaseAllOLEObjects()

文末附加内容
暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇