Range.Rowロー プロパティ

本ページには広告が含まれています。

範囲内の最初の領域の行番号を返します。

構文
Range.Row
引数
戻り値

Range オブジェクトを返すメソッド・プロパティ

Range オブジェクト
セル、行、列、連続した1つ以上のセル範囲を表します。
Application.ActiveCell プロパティ
セルまたはセル範囲を表すRangeオブジェクトを返します。
Application.Cells プロパティ
作業中のワークシートのすべてのセルを表すRange オブジェクトを返します。
Range.Row プロパティ
セル、行、列、連続した1つ以上のセル範囲を表します。
Application.Selection プロパティ
Applicationオブジェクトのアクティブなワークシートで現在選択されているオブジェクトを返します。
Range.Row プロパティ
指定した条件に一致する最初のセルを検索します。
Range.Row プロパティ
Findメソッドによって開始された検索を続行します。前回の検索条件に一致するセルを、下方向(行のときは左から右、列のときは上から下)に検索し、見つかったセル(Rangeオブジェクト)を返します。選択範囲やアクティブセルには影響はありません。
Range.Row プロパティ
範囲内のセルから特定の条件に一致するRange オブジェクトを返します。条件は、セルの種類(数値、テキスト、エラーなど)やセルの状態(空白、定数、数式など)に基づいて指定することができます。
Range.Row プロパティ
指定した範囲の列を表すRange オブジェクトを返します。
Range.Row プロパティ
現在の領域を表すRange オブジェクトを返します。
Range.Row プロパティ
対象セル範囲の領域における終端のRange オブジェクトへの参照を返します。
Range.Row プロパティ
指定された範囲を含む1つまたは複数の列全体を表すRange オブジェクトを返します。読み取り専用です。
Range.Row プロパティ
指定されたセル範囲を含む行全体を表すRange オブジェクトを返します。読み取り専用です。
Range.Row プロパティ
指定したセル範囲のオフセット値で指定される範囲を表すRange オブジェクトを返します。
Range.Row プロパティ
指定された範囲からオフセットした範囲を表すRange オブジェクトを返します。
Range.Row プロパティ
指定された範囲のサイズを変更します。サイズが変更されたセル範囲を表すRange オブジェクトを返します。
Range.Row プロパティ
指定した範囲の行を表すRange オブジェクトを返します。
Worksheet.Range プロパティ
セル、行、列、連続した1つ以上のセル範囲を表します。

行番号の取得例

UWSC
WITH Excel
	PRINT .Range("C2").Row      // 単一セル
	PRINT .Range("D3:F5").Row   // 複数セル
	.Range("B2:F6").Select 
	.Range("F6").Activate
	PRINT .ActiveCell.Row       // アクティブセル
	PRINT .Selection.Row        // 選択セル
ENDWITH
結果
プレーンテキスト
2
3
6
2

プログラム実行例

予定データをExcelから読み込み追加する(Outlook)

[download "/example/625/予定一覧.xlsx"]
UWSC
CONST xlUp = -4162
CONST olAppointmentItem = 1

HASHTBL reminders
reminders["なし"] = -1;       reminders["0分"] = 0;       reminders["5分"] = 5
reminders["10分"] = 10;       reminders["15分"] = 15;     reminders["30分"] = 30
reminders["1時間"] = 60;      reminders["2時間"] = 120;   reminders["3時間"] = 180
reminders["4時間"] = 240;     reminders["5時間"] = 300;   reminders["6時間"] = 360
reminders["7時間"] = 420;     reminders["8時間"] = 480;   reminders["9時間"] = 540
reminders["10時間"] = 600;    reminders["11時間"] = 660;  reminders["0.5日"] = 720
reminders["18時間"] = 1080;   reminders["1日"] = 1440;    reminders["2日"] = 2880
reminders["3日"] = 4320;      reminders["4日"] = 5760;    reminders["1週"] = 10080
reminders["2週"] = 20160

DIM Excel = CREATEOLEOBJ("Excel.Application")
Excel.Visible = TRUE
DIM Workbook = Excel.Workbooks.Open("D:\Desktop\予定一覧.xlsx")

DIM MaxRow = Excel.Cells(Excel.Rows.Count, 1).End(xlUp).Row

DIM Outlook = CREATEOLEOBJ("Outlook.Application")
DIM AppointmentItem = Outlook.CreateItem(olAppointmentItem)

FOR row = 2 TO MaxRow
	PRINT row
	WITH AppointmentItem
		.Subject = Excel.Cells(row, 2).Value        // 件名
		.Location = Excel.Cells(row, 3).Value       // 場所
		.Start = Excel.Cells(row, 4).Value          // 開始時刻
		.End = Excel.Cells(row, 5).Value            // 終了時刻
		IF Excel.Cells(row, 6).Value = "○" THEN .AllDayEvent = TRUE     // 終日
		IFB reminders[Excel.Cells(row, 7).Value] <> -1 THEN
			.ReminderSet = TRUE
			.ReminderMinutesBeforeStart = reminders[Excel.Cells(row, 7).Value]     // リマインダー
		ELSE
			.ReminderSet = FALSE
		ENDIF
		.BusyStatus = 1                             // 公開方法
		.Body = Excel.Cells(row, 8).Value           // 本文
		.Save
	ENDWITH
NEXT

MSGBOX((MaxRow - 1) + "件の予定を登録しました。")

Outlook.Quit
Excel.Quit

気象庁のホームページから一月分の気温を取得しExcelでグラフを作成

UWSC
CONST xlUp = -4162
CONST xlLineMarkers = 65

DIM year = 2020
DIM month = 8

DIM IE = IEBoot()
IE.Navigate("https://www.data.jma.go.jp/obd/stats/etrn/view/daily_s1.php?prec_no=14&block_no=47412&year=" + year + "&month=" + month + "&day=&view=p1")
BusyWait(IE)

DIM array[-1][-1]
DIM element = IE.document.getElementById("tablefix1")
getTableData(element, array)

IE.Quit

DIM Excel = XLOPEN()
DIM SheetName = Excel.ActiveSheet.Name

XLSETDATA(Excel, array, "A1")

DIM row = Excel.Cells(Excel.Rows.Count, 1).End(xlUp).Row
DIM Charts = Excel.Charts.Add

WITH Charts
	.ChartType = xlLineMarkers
	.SeriesCollection.NewSeries
	.HasTitle = TRUE
	.ChartTitle.Text = "札幌 " + year + "年" + month + "月気温"

	WITH .FullSeriesCollection(1)
		.XValues = "=Sheet1!$A$5:$A$35"
		.Name = "=<#DBL>最高気温<#DBL>"
		.Values = "=Sheet1!$H$5:$H$35"
		WITH .Format
			.Fill.ForeColor.RGB = 255
			.Line.ForeColor.RGB = 255
		ENDWITH
	ENDWITH

	WITH .FullSeriesCollection(2)
		.XValues = "=Sheet1!$A$5:$A$35"
		.Name = "=<#DBL>最高気温<#DBL>"
		.Values = "=Sheet1!$I$5:$I$35"
		WITH .Format
			.Fill.ForeColor.RGB = 16711680
			.Line.ForeColor.RGB = 16711680
		ENDWITH
	ENDWITH
ENDWITH

//////////////////////////////////////////////////
// 【引数】
//   array : 要素を追加する配列(参照引数) 
//   values : 追加する要素をvalue1から指定 
// 【戻り値】
//   処理後の配列の要素の数 
//////////////////////////////////////////////////
FUNCTION arrayPush(var array[], value1 = EMPTY, value2 = EMPTY, value3 = EMPTY, value4 = EMPTY, value5 = EMPTY, value6 = EMPTY, value7 = EMPTY, value8 = EMPTY, value9 = EMPTY, value10 = EMPTY, value11 = EMPTY, value12 = EMPTY, value13 = EMPTY, value14 = EMPTY, value15 = EMPTY, value16 = EMPTY)
    DIM i = 1
    WHILE EVAL("value" + i) <> EMPTY
	  DIM res = RESIZE(array, UBound(array) + 1)
	  array[res] = EVAL("value" + i)
	  i = i + 1
	WEND
	RESULT = LENGTH(array)
FEND

//////////////////////////////////////////////////
// 【引数】
//   needle : 検索する値 
//   haystack : 配列 
// 【戻り値】
//   needleが見つかった場合に配列のキー 
//////////////////////////////////////////////////
FUNCTION arraySearch(needle, haystack[])
	DIM i = 0
	FOR item IN haystack
		IFB item = needle THEN
			RESULT = i
			EXIT
		ENDIF
		i = i + 1
	NEXT
FEND

//////////////////////////////////////////////////
// 【引数】
//   IE : IEオブジェクト 
// 【戻り値】
//   
//////////////////////////////////////////////////
PROCEDURE BusyWait(Var IE)
	SLEEP(0.500)
	DIM t = GETTIME()
	TRY
		REPEAT
			DIM tm = GETTIME() - t
			FUKIDASI("BusyWait:" + tm)
			SLEEP(0.010)
			IF tm >= 60 THEN BREAK
		UNTIL !IE.Busy AND IE.readyState = 4
	EXCEPT
		IE = getIEObj(-1)
		PRINT IE.document.URL + " のIEオブジェクトを取得しました。"
		BusyWait(IE)
	ENDTRY
	FUKIDASI()
FEND

//////////////////////////////////////////////////
// 【引数】
//   文字列 or 数値 : 取得したい<a href="https://uwsc.jp/com/ie/" >InternetExplorer オブジェクト</a>のタイトル・URLもしくは数値を指定 
//   完全一致フラグ : (TRUE : 文字列が完全一致したものを取得、FALSE : 文字列の一部を含むものを取得) 
// 【戻り値】
//   条件に一致する<a href="https://uwsc.jp/com/ie" >InternetExplorer</a> 
//////////////////////////////////////////////////
FUNCTION getIEObj(str, flg = FALSE)
	DIM Shell = CREATEOLEOBJ("Shell.Application")
	DIM ShellWindows = Shell.Windows
	DIM IE[-1]
	FOR i = 0 TO ShellWindows.Count - 1
		TRY
			IFB ShellWindows.Item(i).Name = "Internet Explorer" THEN
				arrayPush(IE, ShellWindows.Item(i))
			ENDIF
		EXCEPT
		ENDTRY
	NEXT
	SELECT CHKNUM(str)
		CASE TRUE
			IFB str = 0 THEN
				RESULT = LENGTH(IE)
			ELSE
				IF str < 0 THEN str = str + LENGTH(IE) + 1
				TRY
					RESULT = IE[str-1]
				EXCEPT
					RESULT = ERR_VALUE
				ENDTRY
			ENDIF
		CASE FALSE
			DIM pattern = IIF(flg, "^" + str + "$", str)
			DIM titleList = SLICE(IE)
			FOR i = 0 TO UBound(titleList)
				titleList[i] = titleList[i].Document.title
			NEXT
			DIM urlList = SLICE(IE)
			FOR i = 0 TO UBound(urlList)
				urlList[i] = urlList[i].Document.URL
			NEXT
			DIM num = ERR_VALUE
			SELECT TRUE
				CASE pregGrep(pattern, titleList) <> FALSE;	num = arraySearch(pregGrep(pattern, titleList)[0], titleList)
				CASE pregGrep(pattern, urlList) <> FALSE;		num = arraySearch(pregGrep(pattern, urlList)[0], urlList)
			SELEND
			TRY
				RESULT = IE[num]
			EXCEPT
				RESULT = ERR_VALUE
			ENDTRY
	SELEND
FEND

//////////////////////////////////////////////////
// 【引数】
//   table : tableエレメント 
//   arr : 取得したデータを格納する配列(参照引数) 
// 【戻り値】
//   
//////////////////////////////////////////////////
PROCEDURE getTableData(table, Var arr[][])
	rowMax = table.rows.length - 1
	colMax = 0
	FOR row = 0 TO table.rows.length - 1
		IFB table.rows(row).cells.length - 1 > colMax THEN
			colMax = table.rows(row).cells.length - 1
		ENDIF
	NEXT
	DIM arr[rowMax][colMax]
	FOR row = 0 TO table.rows.length - 1
		FOR col = 0 TO table.rows(row).cells.length - 1
			n = 0
			WHILE arr[row][col + n] <> ""
				n = n + 1
			WEND
			arr[row][col + n] = table.rows(row).cells(col).innerText
			IFB table.rows(row).cells(col).rowSpan > 1 AND table.rows(row).cells(col).colSpan > 1 THEN
				rmax = table.rows(row).cells(col).rowSpan - 1
				cmax = table.rows(row).cells(col).colSpan - 1
				FOR r = 1 TO rmax
					FOR c = 1 TO cmax
						arr[row + r][col + c] = "←"
					NEXT
				NEXT
			ENDIF
			IFB table.rows(row).cells(col).rowSpan > 1 THEN
				n = table.rows(row).cells(col).rowSpan - 1
				WHILE n
					arr[row + n][col] = "↑"
					n = n - 1
				WEND
			ENDIF
			IFB table.rows(row).cells(col).colSpan > 1 THEN
				n = table.rows(row).cells(col).colSpan - 1
				WHILE n
					arr[row][col + n] = "←"
					n = n - 1
				WEND
			ENDIF
		NEXT
	NEXT
FEND

//////////////////////////////////////////////////
// 【引数】
//   InPrivate : InPrivateブラウズ・モードを有効にするときはTRUEを指定 
// 【戻り値】
//   InternetExplorerオブジェクト 
//////////////////////////////////////////////////
FUNCTION IEBoot(InPrivate = FALSE)
	DIM IE
	SELECT InPrivate
		CASE TRUE
			DOSCMD("start iexplore -private")
			GETID("InPrivate - Internet Explorer - [InPrivate]", "IEFrame", -1)
			IE = GETACTIVEOLEOBJ("InternetExplorer.Application","InPrivate - Internet Explorer - [InPrivate]")
		CASE FALSE
			TRY
				IE = CREATEOLEOBJ("InternetExplorer.Application")
				IE.Visible = TRUE
			EXCEPT
				EXEC("C:\Program Files\Internet Explorer\iexplore.exe")
				GETID("Internet Explorer", "IEFrame", -1)
				TRY
					IE = GETACTIVEOLEOBJ("InternetExplorer.Application")	
				EXCEPT
					IE = getIEObj(-1)
				ENDTRY
			ENDTRY
	SELEND
	RESULT = IE
FEND

//////////////////////////////////////////////////
// 【引数】
//   expr : 評価する式 
//   truepart : 評価した式がTrueのときに返す値 
//   falsepart : 評価した式がFalseのときに返す値 
// 【戻り値】
//   truepart : 評価した式がTrueのとき、falsepart : 評価した式がFalseのとき 
//////////////////////////////////////////////////
FUNCTION IIF(expr, truepart, falsepart)
	IFB EVAL(expr) THEN
		RESULT = truepart
	ELSE
		RESULT = falsepart
	ENDIF
FEND

//////////////////////////////////////////////////
// 【引数】
//   pattern : 検索するパターンを表す文字列 
//   array : 検索される配列 
// 【戻り値】
//   
//////////////////////////////////////////////////
FUNCTION pregGrep(pattern, array[], flags = 0)
	DIM res[-1]
	FOR item IN array
		IF reTest(item, pattern) THEN arrayPush(res, item)
	NEXT
	RESULT = SLICE(res)
FEND

//////////////////////////////////////////////////
// 【引数】
//   str : 正規表現による検索の対象となる文字列 
//   Pattern : 正規表現で使用するパターンを設定 
//   IgnoreCase : 大文字・小文字を区別しない場合はTrue、区別する場合はFalse 
//   Global : 文字列全体を検索する場合はTrue、しない場合はFalse 
// 【戻り値】
//   正規表現にマッチするかどうかを示すブール値 
//////////////////////////////////////////////////
FUNCTION reTest(str, Pattern, IgnoreCase = TRUE, Global = TRUE)
	DIM re = CREATEOLEOBJ("VBScript.RegExp")
	re.Pattern = Pattern
	re.IgnoreCase = IgnoreCase
	re.Global = Global
	RESULT = re.Test(str)
FEND

//////////////////////////////////////////////////
// 【引数】
//   inputs : 繰り返す文字列 
//   multiplier : inputsを繰り返す回数 
// 【戻り値】
//   inputsをmultiplier回を繰り返した文字列を返します 
//////////////////////////////////////////////////
FUNCTION strRepeat(inputs, multiplier)
	DIM res = ""
	FOR n = 1 TO multiplier
		res = res + inputs
	NEXT
	RESULT = res
FEND

//////////////////////////////////////////////////
// 【引数】
//   arrayname : 上限値を求める配列の名前 
//   dimension : 返す次元を示す整数 
// 【戻り値】
//   配列の上限値 
//////////////////////////////////////////////////
FUNCTION UBound(arrayname[], dimension = 1)
	RESULT = EVAL("RESIZE(arrayname" + strRepeat("[0]", dimension - 1) + ")")
FEND
結果
2020年8月気温.png
使用関数

コロナのグラフ

UWSC
CONST xlDown = -4121
CONST xlColumnClustered = 51
CONST xlCategory = 1
CONST xlValue = 2
CONST xlLine = 4
CONST msoThemeColorText2 = 15
CONST msoThemeColorBackground1 = 14

DIM Excel = CREATEOLEOBJ("Excel.Application")

WITH Excel
	.Visible = TRUE
	.Workbooks.Open("D:\Downloads\covid19_data.csv")

	DIM ws = .ActiveSheet
	DIM ws2 = .Worksheets.Add(EMPTYPARAM, .Worksheets(.Worksheets.Count))
	ws2.Name = "7日間平均"
	ws.Range("1:1").Copy(ws2.Range("1:1"))
	ws.Range("A:D").Copy(ws2.Range("A:D"))
	ws.Range("W:AB").Copy(ws2.Range("W:AB"))
	ws2.Range("E8").Value = "=INT(SUM(covid19_data!E2:E8)/7)"
	ws2.Range("E8").AutoFill(ws2.Range("E8:V8"))
	DIM lastRow = ws.Range("B2").End(xlDown).Row	
	ws2.Range("E8:V8").AutoFill(ws2.Range("E8:V" + lastRow))

	DIM Chart

	// 検査数
	Chart = .Charts.Add
	.ActiveSheet.Move(EMPTYPARAM, .Sheets(.Sheets.Count))
	.ActiveSheet.Name = "検査数"

	WITH Chart
		.ChartType = xlColumnClustered
		.SetSourceData(ws.Range("covid19_data!$E:$E"))
	
		WITH .SeriesCollection(1)
			.Name = "日検査数"
			.XValues = "covid19_data!$Y2:$Y" + lastRow
			WITH .Format.Line
				.ForeColor.ObjectThemeColor = msoThemeColorText2
				.ForeColor.TintAndShade = 0
				.ForeColor.Brightness = 0.6000000238
				.Transparency = 0
			ENDWITH
		ENDWITH

		WITH .Axes(xlCategory)
			.MinimumScale = dateSerial(2020, 1, 1)		//43831
			.MajorUnit = 4
			.TickLabels.Font.Size = 14
		ENDWITH
	
		WITH .Axes(xlValue)
			.HasMajorGridLines = TRUE
			.HasMinorGridLines = TRUE
			.MinimumScale = 0
			.MajorUnit = 5000
			.MinorUnit = 1000
			.TickLabels.Font.Size = 14
		ENDWITH
	ENDWITH	

	// 陽性数
	Chart = .Charts.Add
	.ActiveSheet.Move(EMPTYPARAM, .Sheets(.Sheets.Count))
	.ActiveSheet.Name = "陽性者数"

	WITH Chart
		.ChartType = xlColumnClustered
		.SetSourceData(ws.Range("covid19_data!$G2:$G" + lastRow))
		.SeriesCollection.NewSeries
		.SeriesCollection(2).Values = "='7日間平均'!$G2:$G" + lastRow

		// 日付
		WITH .SeriesCollection(1)
			.Name = "日陽性数"
			.XValues = "covid19_data!$Y2:$Y" + lastRow
			WITH .Format.Line
				.ForeColor.ObjectThemeColor = msoThemeColorText2
				.ForeColor.TintAndShade = 0
				.ForeColor.Brightness = 0.6000000238
				.Transparency = 0
			ENDWITH
		ENDWITH
	
		// 7日間平均
		WITH .SeriesCollection(2)
			.Name = "7日間平均"
			.ChartType = xlLine
			.Format.Line.ForeColor.RGB = RGBToColor(0, 112, 192)
		ENDWITH
	
		// x軸
		WITH .Axes(xlCategory)
			.MinimumScale = dateSerial(2020, 1, 1)		//43831
			.MajorUnit = 4
			.TickLabels.Font.Size = 14
		ENDWITH
	
		// y軸
		WITH .Axes(xlValue)
			.HasMajorGridLines = TRUE
			.HasMinorGridLines = TRUE
			.MinimumScale = 0
			.MajorUnit = 5000
			.MinorUnit = 1000
			.TickLabels.Font.Size = 14
		ENDWITH
	ENDWITH

	// 死亡数
	Chart = .Charts.Add
	.ActiveSheet.Move(EMPTYPARAM, .Sheets(.Sheets.Count))
	.ActiveSheet.Name = "死亡数"
	
	WITH Chart
		.ChartType = xlColumnClustered
		.SetSourceData(ws.Range("covid19_data!$O2:$O" + lastRow))
		.SeriesCollection.NewSeries
		.SeriesCollection(2).Values = "='7日間平均'!$O2:$O" + lastRow

		WITH .SeriesCollection(1)
			.Name = "日死亡数"
			.XValues = "covid19_data!$Y2:$Y" + lastRow
			WITH .Format.Line
				.ForeColor.ObjectThemeColor = msoThemeColorBackground1
				.ForeColor.TintAndShade = 0
				.ForeColor.Brightness = -0.150000006
				.Transparency = 0
			ENDWITH
		ENDWITH

		WITH .SeriesCollection(2)
			.Name = "7日間平均"
			.ChartType = xlLine
			WITH .Format.Line
				.Weight = 2.5
				.Transparency = 0
				.ForeColor.ObjectThemeColor = msoThemeColorBackground1
				.ForeColor.TintAndShade = 0
				.ForeColor.Brightness = -0.5
			ENDWITH
		ENDWITH	

		WITH .Axes(xlCategory)
			.MinimumScale = dateSerial(2020, 1, 1)		//43831
			.MajorUnit = 4
			.TickLabels.Font.Size = 14
		ENDWITH

		WITH .Axes(xlValue)
			.HasMajorGridLines = TRUE		// 軸あり
			.HasMinorGridLines = TRUE		// 目盛線あり
			.MinimumScale = 0				// 最小値
			.TickLabels.Font.Size = 14		// フォントサイズ
		ENDWITH
	ENDWITH

	// 死亡累計
	Chart = .Charts.Add
	.ActiveSheet.Move(EMPTYPARAM, .Sheets(.Sheets.Count))
	.ActiveSheet.Name = "死亡累計"
	
	WITH Chart
		.ChartType = xlColumnClustered
		.SetSourceData(ws.Range("covid19_data!$P2:$P" + lastRow))
				
		WITH .SeriesCollection(1)
			.Name = "死亡累計"
			.XValues = "covid19_data!$Y2:$Y" + lastRow
			WITH .Format.Line
				.ForeColor.ObjectThemeColor = msoThemeColorBackground1
				.ForeColor.TintAndShade = 0
				.ForeColor.Brightness = -0.150000006
				.Transparency = 0
			ENDWITH
		ENDWITH
		
		WITH .Axes(xlCategory)
			.MinimumScale = dateSerial(2020, 1, 1)		//43831
			.MajorUnit = 4
			.TickLabels.Font.Size = 14
		ENDWITH

		WITH .Axes(xlValue)
			.HasMajorGridLines = TRUE		// 軸あり
			.MinimumScale = 0				// 最小値
			.TickLabels.Font.Size = 14		// フォントサイズ
		ENDWITH

		.ChartTitle.Delete

	ENDWITH

ENDWITH

//////////////////////////////////////////////////
// 【引数】
//   bin : 2進数 
//   signFlg : 符号付きならばTrue 
// 【戻り値】
//   10進数に変換した値 
//////////////////////////////////////////////////
FUNCTION binToDec(bin, signFlg = TRUE)
	DIM dec = 0
	DIM decimalFlg = IIF(POS(".", bin), TRUE, FALSE)
	IFB COPY(bin, 1, 1) = "1" AND signFlg THEN
		DIM msb = IIF(decimalFlg, POS(".", bin) - 1, LENGTH(bin))
		DIM lsb = IIF(decimalFlg, POS(".", bin) - LENGTH(bin), 0)
		DIM dec2 = POWER(2, msb) - 1
		FOR i = -1 TO lsb STEP -1
			dec2 = dec2 + POWER(2, i)
		NEXT
		DIM a = binToDec(bin, FALSE)
		DIM b = dec2
		dec = -1 * (bitXor(a, b) + POWER(2, lsb))
	ELSE
		IFB decimalFlg THEN
			DIM integer = COPY(bin, 1, POS(".", bin) - 1)
			DIM decimal = COPY(bin, POS(".", bin) + 1)
			FOR i = 1 TO LENGTH(decimal)
				dec = dec + COPY(decimal, i, 1) * POWER(2, -1 * i)
			NEXT
		ELSE
			integer = bin
		ENDIF
		FOR i = 1 TO LENGTH(integer)
			dec = dec + COPY(integer, i, 1) * POWER(2, LENGTH(integer) - i)
		NEXT
	ENDIF
	RESULT = dec
FEND

//////////////////////////////////////////////////
// 【引数】
//   num : 10進数もしくは2進数の値 
//   bit : ビット 
// 【戻り値】
//   ビットを反転した値 
//////////////////////////////////////////////////
FUNCTION bitNot(num, bit = EMPTY)
	IFB isString(num) THEN
		DIM res = ""
		FOR i = 1 TO LENGTH(num)
			DIM str = COPY(num, i, 1)
			IFB str = "0" OR str = "1" THEN
				res = res + (1 - VAL(str))
			ELSE
				res = res + str
			ENDIF
		NEXT
		RESULT = res
	ELSE
		DIM exponent = IIF(bit = EMPTY, CEIL(LOGN(2, num + 1)), bit)
		RESULT = POWER(2, exponent) - num - 1
	ENDIF
FEND

//////////////////////////////////////////////////
// 【引数】
//   arg1 : 数値1(10進数) 
//   arg2 : 数値2(10進数) 
// 【戻り値】
//   2つの数値のビット毎の排他的論理和 
//////////////////////////////////////////////////
FUNCTION bitXor(arg1, arg2)
	DIM args[1] = arg1, arg2
	DIM bins[1]
	DIM decimals[1]
	DIM integers[1]
	DIM keta[1]
	IFB ABS(arg1) <> arg1 OR ABS(arg2) <> arg2 THEN
		RESULT = ERR_VALUE
		EXIT
	ENDIF
	FOR i = 0 TO 1
		bins[i] = decToBin(args[i])
		decimals[i] = 0
		IFB POS(".", bins[i]) <> 0 THEN
			integers[i] = COPY(bins[i], 1, POS(".", bins[i]) - 1)
			decimals[i] = COPY(bins[i], POS(".", bins[i]) + 1)
		ELSE
			integers[i] = bins[i]
		ENDIF
	NEXT
	keta[0] = IIF(LENGTH(integers[0]) > LENGTH(integers[1]), LENGTH(integers[0]), LENGTH(integers[1]))
	integers[0] = strPad(integers[0], keta[0], "0", LEFT)
	integers[1] = strPad(integers[1], keta[0], "0", LEFT)
	keta[1] = IIF(LENGTH(decimals[0]) > LENGTH(decimals[1]), LENGTH(decimals[0]), LENGTH(decimals[1]))
	decimals[0] = strPad(decimals[0], keta[1], "0", RIGHT)
	decimals[1] = strPad(decimals[1], keta[1], "0", RIGHT)
	DIM bin = ""
	FOR i = 1 TO keta[0]
		bin = bin + (VAL(COPY(integers[0], i, 1)) XOR VAL(COPY(integers[1], i, 1)))
	NEXT
	bin = bin + "."
	FOR i = 1 TO keta[1]
		bin = bin + (VAL(COPY(decimals[0], i, 1)) XOR VAL(COPY(decimals[1], i, 1)))
	NEXT
	RESULT = binToDec(bin)
FEND

//////////////////////////////////////////////////
// 【引数】
//   year : 年 
//   month : 月 
//   day : 日 
// 【戻り値】
//   シリアル値 
//////////////////////////////////////////////////
FUNCTION dateSerial(year, month, day)
	month = REPLACE(FORMAT(month, 2), " ", "0")
	day = REPLACE(FORMAT(day, 2), " ", "0")
	d = GETTIME(0, year + "/" + month + "/" + day)
	RESULT = uwscToSerial(d)
FEND

//////////////////////////////////////////////////
// 【引数】
//   dec : 10進数 
//   signFlg : 符号付きならばTrueを指定 
//   digits : 変換した2進数の桁数合わせを自動で行うかを示すブール値、もしくは桁数を表す数値(8,16,24,32,64のいずれか)を指定 
// 【戻り値】
//   2進数に変換した値 
//////////////////////////////////////////////////
FUNCTION decToBin(dec, signFlg = FALSE, digits = FALSE)
	// 負数で符号なしならばエラー値を返す
	IFB dec < 0 AND signFlg = FALSE THEN
		PRINT "負数の場合signFlgにTrueを指定してください"
		RESULT = ERR_VALUE
		EXIT
	ENDIF
	
	// digitsのビット数が足りなければエラー値を返す、負数なら1桁多く取る
	IFB VARTYPE(digits) <> VAR_BOOLEAN AND digits < CEIL(LOGN(2, ABS(dec))) + IIF(dec < 0, 1, 0) THEN
		PRINT "ビット数が足りません"
		RESULT = ERR_VALUE
		EXIT
	ENDIF
	
	// signFlgがTrueかつdigitsがFalseならばエラー値を返す
	IFB signFlg AND !digits THEN
		PRINT "signFlgがTrueのときdigitsはFalse以外を選択してください"
		RESULT = ERR_VALUE
		EXIT
	ENDIF

	// bin:2進数に変換した結果を代入する変数
	DIM bin = ""
	DIM decimalFlg = IIF(POS(".", dec) <> 0, TRUE, FALSE)
	DIM negativeFlg = IIF(dec < 0, TRUE, FALSE)
	dec = ABS(dec)
	
	// (1) 10進数を整数部と小数部に分ける
	DIM integer = IIF(decimalFlg, COPY(dec, 1, POS(".", dec) - 1), dec)
	DIM decimal = IIF(decimalFlg, "0." + COPY(dec, POS(".", dec) + 1), 0)

	// (2) 10進数(整数部)を2進数に変換する。
	REPEAT
		bin = (integer MOD 2) + bin
		integer = INT(integer / 2)
	UNTIL integer = 0

	// (3) 10進数(小数部)を2進数に変換する。
	IFB decimalFlg THEN
		bin = bin + "."
		DIM loop = 0
		REPEAT
			loop = loop + 1
			decimal = decimal * 2
			bin = bin + IIF(decimal >= 1, "1", "0")
			IF decimal > 1 THEN decimal = decimal - 1
		UNTIL decimal = 1 OR loop > 64
	ENDIF

	// digitsがFALSE以外なら
	IFB digits THEN
		// (4) 2進数の桁合わせを行う
		DIM tmp = bin
		DIM binInteger = TOKEN(".", tmp)
		DIM binDecimal = TOKEN(".", tmp)
		// 整数部、小数部を4bit単位になるまで拡張
		// 整数部、4の倍数になるまで整数部の先頭に'0'を追加
		IF LENGTH(binInteger) MOD 4 <> 0 THEN binInteger = strRepeat("0", 4 - LENGTH(binInteger) MOD 4) + binInteger
		// 小数部、4の倍数になるまで小数部の末尾に'0'を追加
		IF LENGTH(binDecimal) MOD 4 <> 0 THEN binDecimal = binDecimal + strRepeat("0", 4 - LENGTH(binDecimal) MOD 4)
		DIM digit = LENGTH(binInteger + binDecimal)

		// 10進数の場合、一旦自動調整を行う
		integer = INT(dec)

		IF signFlg AND COPY(binInteger, 1, 1) = "1" THEN binInteger = strRepeat("0", 4) + binInteger

		IFB signFlg THEN
			IFB integer >= -128 AND integer <= 127 THEN						// -2^7〜2^7-1
				binInteger = strRepeat("0", 8 - LENGTH(binInteger)) + binInteger
			ELSEIF integer >= -32768 AND integer <= 32767 THEN				// -2^15〜2^15-1
				binInteger = strRepeat("0", 16 - LENGTH(binInteger)) + binInteger
			ELSEIF integer >= -8388608 AND integer <= 8388607 THEN			// -2^23〜2^23-1
				binInteger = strRepeat("0", 24 - LENGTH(binInteger)) + binInteger
			ELSEIF integer >= -2147783648 AND integer <= 2147483647 THEN	// -2^31〜2^31-1
				binInteger = strRepeat("0", 32 - LENGTH(binInteger)) + binInteger
			ELSE
				binInteger = strRepeat("0", 64 - LENGTH(binInteger)) + binInteger
			ENDIF
		ELSE
			IFB integer <= 255 THEN				// 2^8-1
				binInteger = strRepeat("0", 8 - LENGTH(binInteger)) + binInteger		
			ELSEIF integer <= 65535 THEN		// 2^16-1
				binInteger = strRepeat("0", 16 - LENGTH(binInteger)) + binInteger		
			ELSEIF integer <= 16777215 THEN		// 2^24-1
				binInteger = strRepeat("0", 24 - LENGTH(binInteger)) + binInteger
			ELSEIF integer <= 4294967295 THEN	// 2^32-1
				binInteger = strRepeat("0", 32 - LENGTH(binInteger)) + binInteger
			ELSE
				binInteger = strRepeat("0", 64 - LENGTH(binInteger)) + binInteger
			ENDIF
		ENDIF

		totalDigits = LENGTH(binInteger + binDecimal)

		IFB totalDigits > 64 THEN
			DIM del32 = totalDigits - 32
			DIM del64 = totalDigits - 64
			IFB del32 = LENGTH(binDecimal) AND digits <> 64 THEN
				binDecimal = ""
				PRINT "32bitを超えたため、小数点以下を削除しました"
			ELSEIF del32 < LENGTH(binDecimal) AND digits <> 64 THEN
				binDecimal = COPY(binDecimal, 1, LENGTH(binDecimal) - del32)
				PRINT "32bitを超えたため、小数点以下の一部を削除しました"
			ELSEIF del64 = LENGTH(binDecimal) AND del64 <> 0 THEN
				binDecimal = ""
				PRINT "64bitを超えたため、小数点以下を削除しました"
			ELSEIF del64 < LENGTH(binDecimal) THEN
				binDecimal = COPY(binDecimal, 1, LENGTH(binDecimal) - del64)
				PRINT "64bitを超えたため、小数点以下の一部を削除しました"
			ELSE
				RESULT = ERR_VALUE
				PRINT "64bitを超えるため、変換できません"
				EXIT
			ENDIF
		ENDIF

		// 整数部、小数部の合計桁数を8,16,24,32,64bit単位になるまで拡張
		digit = LENGTH(binInteger + binDecimal)
		DIM array[] = 8, 16, 24, 32, 64
		FOR item IN array
			IFB digit <= item THEN
				binInteger = strRepeat("0", item - digit) + binInteger
				BREAK
			ENDIF
		NEXT

		// 指定ビットに調整
		// 合計桁数の再設定
		totalDigits = LENGTH(binInteger + binDecimal)
		
		IFB digits = TRUE THEN
			// 桁合わせを自動調整
			IFB totalDigits > 64 THEN
				len = LENGTH(binInteger + binDecimal)
				WHILE LENGTH(binInteger) > 8 AND len > digits
					IFB COPY(binInteger, 1, 4) = "0000" THEN
						binInteger = COPY(binInteger, 5)
						len = len - 4
					ELSE
						BREAK
					ENDIF
				WEND
	
				WHILE LENGTH(binDecimal) > 4 AND LENGTH(binInteger + binDecimal) > digits
				IFB COPY(binDecimal, LENGTH(binDecimal) - 4) = "0000" THEN
					binDecimal = COPY(binDecimal, 1, LENGTH(binDecimal) - 4)
					ELSE
						BREAK
					ENDIF
				WEND
				tmp = binInteger + "." + binDecimal

				binInteger = COPY(tmp, 1, POS(".", tmp) - 1)
				binDecimal = COPY(tmp, POS(".", tmp) + 1)
				totalDigits = LENGTH(binInteger + binDecimal)
				IFB totalDigits > 64 THEN
					RESULT = ERR_VALUE
					PRINT "64bitを超えたため変換できません"
					EXIT
				ENDIF
			ENDIF
		ELSE
			// 指定ビットに調整
			IFB totalDigits <= digits THEN
				binInteger = strPad(binInteger, digits - LENGTH(binDecimal), "0", LEFT)
			ELSE
				// 桁あふれ調整
				totalDigits = LENGTH(binInteger + binDecimal)

				len = LENGTH(binInteger + binDecimal)
				WHILE LENGTH(binInteger) > 8 AND len > digits
					IFB COPY(binInteger, 1, 4) = "0000" THEN
						binInteger = COPY(binInteger, 5)
						len = len - 4
					ELSE
						BREAK
					ENDIF
				WEND
	
				WHILE LENGTH(binDecimal) > 4 AND LENGTH(binInteger + binDecimal) > digits
				IFB COPY(binDecimal, LENGTH(binDecimal) - 4) = "0000" THEN
					binDecimal = COPY(binDecimal, 1, LENGTH(binDecimal) - 4)
					ELSE
						BREAK
					ENDIF
				WEND
				tmp = binInteger + "." + binDecimal

				binInteger = COPY(tmp, 1, POS(".", tmp) - 1)
				binDecimal = COPY(tmp, POS(".", tmp) + 1)
				len = LENGTH(binInteger + binDecimal)
				IFB len > digits THEN
					DIM deleteLength = len - digits
					IFB deleteLength = LENGTH(binDecimal) THEN
						binDecimal = ""
						PRINT "指定ビット数にするため小数点以下を削除しました"
					ELSEIF deleteLength < LENGTH(binDecimal) THEN
						binDecimal = COPY(binDecimal, 1, LENGTH(binDecimal) - deleteLength)
						PRINT "指定ビット数にするため小数点以下の一部を削除しました"
					ELSE
						RESULT = ERR_VALUE
						PRINT "指定ビット数では変換できません"
						EXIT
					ENDIF
				ENDIF
			ENDIF
		ENDIF

		bin = binInteger + IIF(binDecimal <> "", "." + binDecimal, "")

		// (5) 入力値がマイナスのため、2進数をマイナス値に変換する
		IFB negativeFlg THEN
			// 1の補数
			bin = bitNot(bin)
			// 2の補数
			DIM res = ""
			DIM carry = "1"
			FOR i = LENGTH(bin) TO 1 STEP -1
				IFB carry = "1" THEN
					SELECT COPY(bin, i, 1)
						CASE "0"
							res = "1" + res
							carry = 0
						CASE "1"
							res = "0" + res
						DEFAULT
							res = COPY(bin, i, 1) + res
					SELEND
				ELSE
					res = COPY(bin, i, 1) + res
				ENDIF
			NEXT
			bin = res
		ENDIF
	ENDIF
	RESULT = bin
FEND

//////////////////////////////////////////////////
// 【引数】
//   dec : 10進数 
//   signFlg : 符号付きならばTrue 
//   recursive : 再帰処理の深さ。処理する際に必要なだけで指定する必要はありません。 
// 【戻り値】
//   16進数に変換した値 
//////////////////////////////////////////////////
FUNCTION decToHex(dec, signFlg = TRUE, recursive = 1)
	DIM hex = ""
	DIM array[] = "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"
	DIM decimalFlg = IIF(POS(".", dec) <> 0, TRUE, FALSE)
	DIM negativeFlg = IIF(dec < 0, TRUE, FALSE)
	dec = ABS(dec)
	DIM integer = IIF(decimalFlg, COPY(dec, 1, POS(".", dec) - 1), dec)
	DIM offset = POWER(10, LENGTH(dec) - POS(".", dec))
	DIM decimal = IIF(decimalFlg, COPY(dec, POS(".", dec) + 1) / offset, 0)
	REPEAT
		hex = array[integer MOD 16] + hex
		integer = INT(integer / 16)
	UNTIL integer = 0
	IFB decimalFlg THEN
		hex = hex + "."
		DIM loop = 0
		REPEAT
			loop = loop + 1
			decimal = decimal * 16
			hex = hex + array[decimal]
			offset = POWER(10, LENGTH(decimal) - POS(".", decimal))
			decimal = (decimal * offset - INT(decimal) * offset) / offset
		UNTIL decimal = 0 OR loop >= 4
	ENDIF
	DIM bin = hexToBin(hex)
	DIM keta = LENGTH(bin)
	IFB keta < 8 THEN
		bin = strPad(bin, decimalFlg + 8, "0", LEFT)
	ELSEIF keta < 16 THEN
		bin = strPad(bin, decimalFlg + 16, "0", LEFT)
	ELSEIF keta < 24 THEN
		bin = strPad(bin, decimalFlg + 24, "0", LEFT)
	ELSEIF keta < 32 THEN
		bin = strPad(bin, decimalFlg + 32, "0", LEFT)
	ELSE
		bin = strPad(bin, decimalFlg + 64, "0", LEFT)
	ENDIF
	IFB negativeFlg THEN
		DIM msb = IIF(decimalFlg, POS(".", bin) - 1, LENGTH(bin))
		DIM lsb = IIF(decimalFlg, POS(".", bin) - LENGTH(bin), 0)
		DIM a = hexToDec(hex, FALSE)
		DIM b = POWER(2, msb) - 1
		FOR i = -1 TO lsb STEP -1
			b = b + POWER(2, i)
		NEXT
		dec = bitXor(a, b) + POWER(2, lsb)
		hex = decToHex(dec, signFlg, recursive + 1)
	ENDIF
	IFB recursive = 1 THEN
		DIM bit = COPY(hexToBin(COPY(hex, 1, 1)), 1, 1)
		DIM len = LENGTH(REPLACE(hex, ".", ""))
		IF negativeFlg AND (bit = "0" OR len MOD 2 <> 0) THEN hex = strRepeat("F", IIF(len MOD 2 <> 0, 1, 2)) + hex
		IF !negativeFlg AND signFlg AND (bit = "1" OR len MOD 2 <> 0) THEN hex = strRepeat("0", IIF(len MOD 2 <> 0, 1, 2)) + hex
	ENDIF
	RESULT = hex
FEND

//////////////////////////////////////////////////
// 【引数】
//   hex : 16進数 
// 【戻り値】
//   2進数に変換した値 
//////////////////////////////////////////////////
FUNCTION hexToBin(hex)
	HASHTBL hb
	hb["0"] = "0000";	hb["1"] = "0001";	hb["2"] = "0010";	hb["3"] = "0011";
	hb["4"] = "0100";	hb["5"] = "0101";	hb["6"] = "0110";	hb["7"] = "0111";
	hb["8"] = "1000";	hb["9"] = "1001";	hb["A"] = "1010";	hb["B"] = "1011";
	hb["C"] = "1100";	hb["D"] = "1101";	hb["E"] = "1110";	hb["F"] = "1111";
	DIM bin = ""
	IFB POS(".", hex) <> 0 THEN
		FOR i = 1 TO LENGTH(hex)
			DIM str = COPY(hex, i, 1)
			IF str = "." THEN bin = bin + "."
			bin = bin + hb[str]
		NEXT
	ELSE
		FOR i = 1 TO LENGTH(hex)
			bin = bin + hb[COPY(hex, i, 1)]
		NEXT
	ENDIF
	RESULT = bin
FEND

//////////////////////////////////////////////////
// 【引数】
//   hex : 16進数 
//   signFlg : 符号付きならばTrue 
// 【戻り値】
//   10進数に変換した値 
//////////////////////////////////////////////////
FUNCTION hexToDec(hex, signFlg = TRUE)
	hex = STRCONV(hex, SC_UPPERCASE)
	DIM dec = 0
	DIM decimalFlg = IIF(POS(".", hex) <> 0, TRUE, FALSE)
	hex = IIF(LENGTH(REPLACE(hex,".", "" )) MOD 2 <> 0, "0", "") + hex
	DIM negativeFlg = IIF(COPY(hexToBin(hex), 1, 1) = "1", TRUE, FALSE)
	DIM sign = 1
	IF negativeFlg AND signFlg THEN sign = -1
	IFB negativeFlg AND signFlg THEN
		DIM bin = hexToBin(hex)
		DIM msb = IIF(decimalFlg, POS(".", bin) - 1, LENGTH(bin))
		DIM lsb = IIF(decimalFlg, POS(".", bin) - LENGTH(bin), 0)
		DIM a = hexToDec(hex, FALSE)
		DIM b = POWER(2, msb) - 1
		FOR i = -1 TO lsb STEP -1
			b = b + POWER(2, i)
		NEXT
		DIM dec2 = bitXor(a, b) + POWER(2, lsb)
		hex = decToHex(dec2)
	ENDIF
	integer = IIF(decimalFlg, COPY(hex, 1, POS(".", hex) - 1), hex)
	decimal = IIF(decimalFlg, COPY(hex, POS(".", hex) + 1), "0")
	FOR i = 1 TO LENGTH(integer)
		s = COPY(hex, i, 1)
		num = IIF(CHKNUM(s), s, ASC(s) - (ASC("A") - 10))
		dec = dec + num * POWER(16, LENGTH(integer) - i)
	NEXT
	FOR i = 1 TO LENGTH(decimal)
		s = COPY(decimal, i, 1)
		num = IIF(CHKNUM(s), s, ASC(s) - (ASC("A") - 10))
		dec = dec + num * POWER(16, -1 * i)
	NEXT
	RESULT = sign * dec
FEND

//////////////////////////////////////////////////
// 【引数】
//   expr : 評価する式 
//   truepart : 評価した式がTrueのときに返す値 
//   falsepart : 評価した式がFalseのときに返す値 
// 【戻り値】
//   truepart : 評価した式がTrueのとき、falsepart : 評価した式がFalseのとき 
//////////////////////////////////////////////////
FUNCTION IIF(expr, truepart, falsepart)
	IFB EVAL(expr) THEN
		RESULT = truepart
	ELSE
		RESULT = falsepart
	ENDIF
FEND

//////////////////////////////////////////////////
// 【引数】
//   variable : 型を調べる変数 
// 【戻り値】
//    : TRUE : 与えられた変数が文字列型である、 
//   FALSE : 与えられた変数が文字列型でない、 : 
//////////////////////////////////////////////////
FUNCTION isString(variable)
	RESULT = IIF(VARTYPE(variable) = VAR_ASTR OR VARTYPE(variable) = VAR_USTR, TRUE, FALSE)
FEND

//////////////////////////////////////////////////
// 【引数】
//   r : 赤成分もしくは#RRGGBB形式の文字列 
//   g : 緑成分。rで#RRGGBB形式の文字列を指定した場合は省略。 
//   b : 青成分。rで#RRGGBB形式の文字列を指定した場合は省略。 
// 【戻り値】
//   Color値 
//////////////////////////////////////////////////
FUNCTION RGBToColor(r, g = EMPTY, b = EMPTY)
	IFB COPY(r, 1, 1) = "#" THEN
		DIM color = 0
		FOR i = 1 TO 3
			color = color + VAL(hexToDec(COPY(r, i * 2, 2), FALSE)) * POWER(256, i - 1)
		NEXT
		RESULT =  color
	ELSE
		RESULT = r + g * 256 + b * 65536
	ENDIF
FEND

//////////////////////////////////////////////////
// 【引数】
//   num : 符号を求める数値 
// 【戻り値】
//   1 : 正の数、0 : ゼロ、-1 : 負の数、ERR_VALUE : それ以外 
//////////////////////////////////////////////////
FUNCTION sign(num)
	SELECT TRUE
		CASE !CHKNUM(num)
			RESULT = ERR_VALUE
		CASE num > 0
			RESULT = 1
		CASE num = 0
			RESULT = 0
		CASE num < 0
			RESULT = -1
	SELEND
FEND

//////////////////////////////////////////////////
// 【引数】
//   input : 入力文字列 
//   length : 埋めたあとの長さ 
//   str : 埋める文字 
//   type : 埋める方向 
// 【戻り値】
//   指定文字で埋めた文字列 
//////////////////////////////////////////////////
FUNCTION strPad(input, length, str = " ", type = RIGHT)
	DIM s = ""
	SELECT type
		CASE LEFT
			FOR i = 1 TO CEIL((length - LENGTH(input)) / LENGTH(str))
				s = s + str
			NEXT
			input = COPY(s, 1, length - LENGTH(input)) + input
		CASE RIGHT
			FOR i = 1 TO CEIL((length - LENGTH(input)) / LENGTH(str))
				s = s + str
			NEXT
			input = input + COPY(s, 1, length - LENGTH(input))
	SELEND
	RESULT = input
FEND

//////////////////////////////////////////////////
// 【引数】
//   inputs : 繰り返す文字列 
//   multiplier : inputsを繰り返す回数 
// 【戻り値】
//   inputsをmultiplier回を繰り返した文字列を返します 
//////////////////////////////////////////////////
FUNCTION strRepeat(inputs, multiplier)
	DIM res = ""
	FOR n = 1 TO multiplier
		res = res + inputs
	NEXT
	RESULT = res
FEND

//////////////////////////////////////////////////
// 【引数】
//   uwscTime : UWSC時間 
// 【戻り値】
//   シリアル値 
//////////////////////////////////////////////////
FUNCTION uwscToSerial(uwscTime)
	uwscDate = uwscTime / 86400
	RESULT = 36526 + uwscDate
FEND
使用関数

関連記事

Range オブジェクト
セル、行、列、連続した1つ以上のセル範囲を表します。
Application.ActiveCell プロパティ (Excel)
セルまたはセル範囲を表すRangeオブジェクトを返します。
Application.Cells プロパティ (Excel)
作業中のワークシートのすべてのセルを表すRange オブジェクトを返します。
Range.Activate メソッド (Excel)
1つのセルをアクティブにします。セルは現在の選択範囲内にある必要があります。セルの範囲を選択するには、Selectメソッドを使用します。
Range.AutoFill メソッド (Excel)
指定された対象セル範囲内のセルに対してオートフィルを実行します。
Range.AutoFilter メソッド (Excel)
オートフィルターを使ってリストをフィルター処理します。
Range.ClearHyperlinks メソッド (Excel)
指定された範囲からすべてのハイパーリンクを削除します。
Range.Copy メソッド (Excel)
範囲を、指定の範囲またはクリップボードにコピーします。
Range.DiscardChanges メソッド (Excel)
編集されたセル範囲内のすべての変更を破棄します。
Range.NumberFormatLocal プロパティ (Excel)