This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with a as | |
( | |
select 0 as n from dual | |
union all | |
select 1 from dual | |
) | |
select | |
case | |
when mod(n, 3) = 0 and mod(n, 5) = 0 then 'FizzBuzz' | |
when mod(n, 3) = 0 then 'Fizz' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Set iTunesApp = WScript.CreateObject("iTunes.Application") | |
For Each track In iTunesApp.LibraryPlaylist.Tracks | |
WScript.StdOut.Write track.Artist & "," | |
WScript.StdOut.Write track.Album & "," | |
WScript.StdOut.Write track.TrackNumber & "," | |
WScript.StdOut.Write track.Name & "," | |
WScript.StdOut.Write track.Composer & "," | |
WScript.StdOut.Write track.Duration & "," | |
WScript.StdOut.Write track.BitRate | |
WScript.StdOut.WriteLine |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'win32ole' | |
excelApp = WIN32OLE.new('Excel.Application') | |
excelApp.Visible = 1 | |
excelApp.DisplayAlerts = 0 #警告メッセージをOFF | |
#ブックを読み取り専用で開く | |
book = excelApp.WorkBooks.Open(ARGV[0], false, true) | |
book.WorkSheets.each do |sheet| | |
puts(sheet.Name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.jacob.com.*; | |
import com.jacob.activeX.*; | |
public class Lesson001 | |
{ | |
public static void main(String[] args) { | |
ActiveXComponent excelApp = new ActiveXComponent("Excel.Application"); | |
try { | |
excelApp.setProperty("Visible", new Variant(true)); | |
excelApp.setProperty("DisplayAlerts", new Variant(false)); //警告メッセージをOFF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dim excelApp: Set excelApp = CreateObject("Excel.Application") | |
excelApp.Visible = True | |
excelApp.DisplayAlerts = False '警告メッセージをOFF | |
'ブックを読み取り専用で開く | |
Dim book: Set book = excelApp.Workbooks.Open(WScript.Arguments(0), False, True) | |
For Each sheet In book.Sheets | |
WScript.Echo sheet.Name | |
Next |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var excelApp = WScript.CreateObject("Excel.Application"); | |
excelApp.Visible = true; | |
excelApp.DisplayAlerts = false; //警告メッセージをOFF | |
//ブックを読み取り専用で開く | |
var book = excelApp.Workbooks.Open(WScript.Arguments(0), false, true); | |
for (var i=1;i<=book.Sheets.Count;i++) | |
{ | |
WScript.Echo(book.Sheets(i).Name); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Win32::OLE; | |
Win32::OLE::CreateObject("Excel.Application", $excelApp); # || die; # "fail! : $!"; | |
$excelApp->{Visible} = 1; | |
$excelApp->{DisplayAlerts} = 0; #警告メッセージをOFF | |
#ブックを読み取り専用で開く | |
$book = $excelApp->WorkBooks->Open($ARGV[0], 0, 1); | |
foreach $i (1..$book->WorkSheets->Count) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// EXCELのインスタンス作成 | |
$excelApp = new COM("Excel.Application"); # or die; | |
$excelApp->Visible = 1; | |
$excelApp->DisplayAlerts = 0; #警告メッセージをOFF | |
#ブックを読み取り専用で開く | |
$book = $excelApp->Workbooks->Open($argv[1], false, true); | |
foreach ($book->Worksheets as $sheet) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Runtime.InteropServices; | |
using System.Reflection; | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
//Excelファイルパス | |
try | |
{ | |
// Excel操作用COMオブジェクトを生成する |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[System.Reflection.Assembly]::LoadWithPartialName("System.Data") | |
$cs = "Provider=MSDAORA;User ID=xxxxx;Password=yyyyy;Data Source=zzzzz" | |
$oraCon = New-Object System.Data.OleDb.OleDbConnection($cs) | |
$oraCmd = New-Object System.Data.OleDb.OleDbCommand | |
$oraCon.Open() | |
$oraCmd.Connection = $oraCon | |
$oraCmd.CommandText = "SELECT * FROM wwwwww" | |
$oraReader = $oraCmd.ExecuteReader() | |
while ($oraReader.Read()) | |
{ |
OlderNewer