2023-10-02から1日間の記事一覧
準備 using namespace Microsoft.Office.Interop.Excel [Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Interop.Excel") これは[Microsoft.Office.Interop.Excel.Range] などを [Range] と省略できるメリットがあるが、名前空間にうるさい人…
int[] にキャスト PS> $arr = ([int[]](1..3)) PS> $arr.GetType() IsPublic IsSerial Name BaseType -------- -------- ---- -------- True True Int32[] System.Array foreach-objectするとObject[] PS> $arr2 = $arr | %{ $_ } PS> $arr2.GetType() IsPub…