001.
<html>
002.
<head>
003.
<meta http-equiv=
"x-ua-compatible"
content=
"ie=edge"
>
004.
<meta charset=
"utf-8"
>
005.
<script src=
"https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"
></script>
006.
<link rel=
"stylesheet"
href=
"https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.1/css/bootstrap.css"
/>
007.
008.
<script src=
"https://winofsql.jp/hta.js"
></script>
009.
010.
<script>
011.
012.
013.
centerWindow( 1100, 900 );
014.
015.
var
Fso = newObject(
"Scripting.FileSystemObject"
);
016.
var
Helper = newObject(
"Lbox.BatchHelper"
);
017.
018.
$(
function
(){
019.
020.
021.
022.
023.
$(
".btn"
).css({
024.
"margin-top"
:
"-4px"
025.
});
026.
027.
028.
$(
"#act1"
).on(
"click"
,
function
(){
029.
if
( Helper ==
null
) {
030.
alert(
"BatchHelper はインストールされていません"
);
031.
return
;
032.
}
033.
034.
var
filePath = Helper.OpenFileNames(
"ファイルの選択"
,
"全て,*.*,CSV,*.csv"
,
""
,
""
);
035.
036.
037.
if
( filePath ==
""
) {
038.
alert(
"ファイルの参照選択がキャンセルされました"
)
039.
return
;
040.
}
041.
042.
var
fileArray = filePath.split(
"\t"
);
043.
loadTable( fileArray );
044.
045.
});
046.
047.
});
048.
049.
</script>
050.
051.
<style>
052.
053.
.ttl {
054.
display: inline-block;
055.
width: 120px;
056.
vertical-align: top;
057.
}
058.
.entry {
059.
display: inline-block;
060.
}
061.
062.
063.
#head {
064.
padding: 20px;
065.
width: 100%;
066.
height: 80px;
067.
background-color:
#e0e0e0;
068.
}
069.
#extend {
070.
padding: 4px 16px;
071.
display: block;
072.
margin-left: auto;
073.
margin-right: auto;
074.
width: calc( 100% - 3px );
075.
height: calc( 100% - 80px - 2px );
076.
border: solid 2px
#c0c0c0;
077.
overflow: scroll;
078.
}
079.
.row_data td {
080.
cursor:
default
!important;
081.
}
082.
html,body {
083.
height: 100%;
084.
}
085.
086.
</style>
087.
088.
</head>
089.
<body>
090.
<div id=
"head"
>
091.
092.
<p
class
=
"ttl"
>
093.
処理
094.
</p>
095.
<p
class
=
"entry"
>
096.
<input
097.
id=
"act1"
098.
class
=
"ml-4 btn btn-primary"
099.
type=
"button"
100.
value=
"ファイルを開くダイアログ ( 複数選択 )"
>
101.
</p>
102.
103.
</div>
104.
<div id=
"extend"
>
105.
<table
class
=
"table table-hover"
>
106.
<tbody id=
"tbl"
>
107.
</tbody>
108.
</table>
109.
<br>
110.
</div>
111.
112.
</body>
113.
</html>