木曜日, 11月 10, 2005
[VB.NET]Excelの表示形式
■Excelの表示形式の設定
Excel.Application.Workbooks(book).Sheets(sheet).Cells(row,col).NumberFormatLocal = "#,##0.0_ "
Excel.Application.Workbooks(book).Sheets(sheet).Cells(row,col).Validation.Delete()
Excel.Application.Workbooks(book).Sheets(sheet).Cells(row,col).Validation.Add(Type:=Excel.XlDVType.xlValidateDecimal, AlertStyle:=Excel.XlDVAlertStyle.xlValidAlertStop, Operator:=Excel.XlFormatConditionOperator.xlGreater, Formula1:="-999999999")
Excel.Application.Workbooks(book).Sheets(sheet).Cells(row,col).NumberFormatLocal = "#,##0.0_ "
Excel.Application.Workbooks(book).Sheets(sheet).Cells(row,col).Validation.Delete()
Excel.Application.Workbooks(book).Sheets(sheet).Cells(row,col).Validation.Add(Type:=Excel.XlDVType.xlValidateDecimal, AlertStyle:=Excel.XlDVAlertStyle.xlValidAlertStop, Operator:=Excel.XlFormatConditionOperator.xlGreater, Formula1:="-999999999")