Google
 
Web itpro-blogger.blogspot.com
日曜日, 11月 09, 2008

[VB2005]EXCELの幅設定・折り返し設定

▼質問
EXCELの幅を設定したり、折り返し設定をしたいんだ。

どうやったらできるか教えてくれ!

▼回答
次を参考にしてくれ!

Dim xlApp As Object = CreateObject("Excel.Application")
Dim wWorksheet As Excel.Worksheet = CType(xlApp.ActiveWorkbook.ActiveSheet, Excel.Worksheet)

CType(wWorksheet.Cells(1, 1), Excel.Range).ColumnWidth = 10
CType(wWorksheet.Cells(1, 1), Excel.Range).WrapText = True
wWorksheet.Cells(1, 1) = "あいうえおかきくけこ"






Comments: コメントを投稿

<< Home

This page is powered by Blogger. Isn't yours?