Guest User

Untitled

a guest
Sep 26th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. use Win32::OLE;
  2.  
  3. Win32::OLE::CreateObject("Excel.Application", $excelApp); # || die; # "fail! : $!";
  4. $excelApp->{Visible} = 1;
  5. $excelApp->{DisplayAlerts} = 0; #警告メッセージをOFF
  6.  
  7. #ブックを読み取り専用で開く
  8. $book = $excelApp->WorkBooks->Open($ARGV[0], 0, 1);
  9.  
  10. foreach $i (1..$book->WorkSheets->Count)
  11. {
  12. print $book->WorkSheets($i)->Name, "\n";
  13. }
  14.  
  15. $book->Close();
  16. $excelApp->Quit();
Add Comment
Please, Sign In to add comment