下図のようなコンパイルエラーが表示された場合、 参照設定の「Microsoft Scripting Runtime」にチェックが付いてないことが多い。以下の手順でチェックを付ける。 ①Visual Basic Editorのメニューの[ツール]-[参照設定]を選択。 ②下図のようなダイアログが表示されるので、「Microsoft Scripting Runtime」にチェックを付け、OKボタンをクリックする。 上記の手順で実行すればうまくいくはず。
[{ "ID": "1", "名前": "鈴木", "得点": "91" }, { "ID": "2", "名前": "田中", "得点": "86" }, { "ID": "3", "名前": "山本", "得点": "87" }, { "ID": "4", "名前": "高橋", "得点": "78" }] 実際は「[{“ID”:”1″,”名前”:”鈴木”,”得点”:”91″},{“ID”:”2″,”名前”:”田中”,”得点”:”86″},{“ID”:”3″,”名前”:”山本”,”得点”:”87″},{“ID”:”4″,”名前”:”高橋”,”得点”:”78″}]」のように改行はありません。 Sub 表をJSON形式に() arrs = Cells(1, 1).CurrentRegion '1から行数まで、1から列数まで len_row = UBound(arrs, 1) '行数 len
通常のテキストファイルの読み込みや書き込みだと文字コードがShift_jisでしか扱えません。 他の文字コードを使いたい場合はADODB.Streamを使います。 テキストファイルの読み込み Dim sr As Object Dim strData As String Set sr = CreateObject("ADODB.Stream") sr.Mode = 3 '読み取り/書き込みモード sr.Type = 2 'テキストデータ sr.Charset = "UTF-8" '文字コードを指定 sr.Open 'Streamオブジェクトを開く sr.LoadFromFile ("ファイルのフルパス") 'ファイルの内容を読み込む sr.Position = 0 'ポインタを先頭へ strData = sr.ReadText() 'データ読み込み sr.Close 'Streamを閉じる
『エクセルで円形のレーダーチャートを作る』 Adobe Illustratorシリーズでは簡単に作れる同心円状のレーダーチャートですが、いざエクセルで作るとなると少々複雑な手順が必要です。以前エクセルで円形のレーダーチャートを作る必要にかられ、オンラインで作り方の記事を検索してみましたが、いまいち的を得ない記事が多かったので、ここで作り方を詳しく紹介しておきます。 エクセル標準で作れるレーダーチャートは、下の図右のようにデータの個数に応じた多角形のものだけで、左のような円形のレーダーチャートは通常作れません。エクセルで円形のレーダーチャートを作るには、通常の多角形レーダーチャートにドーナツグラフを組み合わせて作ることになります。 多角形を使うか円形を使うかはデザイン上の好みの問題ですが、作り方の手順を覺えておきましょう。 左:エクセル標準の多角形レーダーチャート。右:円形のレーダーチャート
ExcelからXMLファイルを作ってそれをFTPでアップロードしたかったのですが 全部Excelにやらせるのもちょっと怖くてですね。 Excelで出力したXMLファイルをwindowsバッチ(.bat)でFTPアップロードすることにしたのです。 ほんで、そのバッチをExcelマクロから叩きたいな~ってのが今回の経緯。 結論から言えば、これでいけましたφ(--) Dim batFileName As String batFileName = バッチファイル名フルパス Dim ShellObject As Object Set ShellObject = CreateObject("WScript.Shell") ShellObject.Run batFileName, 1, True
ツイート Excelのマクロは基本的にExcelを操作するための機能です。 しかし、ときにはExcel以外の、他のアプリケーションを起動したいこともあるでしょう。 ここでは、VBAで他アプリを起動したり、そのアプリを操作したりするテクニックをご紹介します。 ■Shell関数でアプリケーションを起動する 他のアプリケーションを起動する最も簡単な方法の一つはShell関数です。 Shell関数は、引数で指定した実行形式ファイルを起動します。 Sub Sample1() Dim rc As Long rc = Shell("notepad.exe", vbNormalFocus) If rc = 0 Then MsgBox "起動に失敗しました" End Sub Sample1はWindows標準ツールの「メモ帳」を起動します。 メモ帳の実行形式ファイルはnotepad.exeで、一般的にはC:
The Life Log of baca最近仕事でJavaScriptを読んだり書いたりしているのですが,JSONファイルにデータを大量に書く必要があって,元データがExcelで来るのでマクロで作れるようにしました. 別にこんなの1時間程度で作れると思うのですけど,こんなことで同じように時間を浪費する必要はないと思うので,公開しておきます. JSON_File_Maker 使い方はそんなに迷うことはないと思います.ファイル開いて頂ければコメントが書いてありますのでそちらを参照してください. # ちょっとプログラムとしてイケてないところがあるんだけど,まぁコストかける場所じゃないっしょ...ということで(言い訳 ところで,JSONファイルをクロスドメイン環境で使おうと思ったら,元々使えるような仕様になっていないと初めて知りました. JSONPとか言うものがあるようですが,これについては
Sub 表をJSON形式にする() Dim arr(1000) Dim gyo, retsu, gyosu, cnt As Long Dim lin, temp As String arr(0) = “[" gyo = 2 Do retsu = 1 lin = "" Do temp = Chr(34) & Cells(1, retsu) & Chr(34) & ":" & Chr(34) & Cells(gyo, retsu) & Chr(34) lin = lin & "," & temp retsu = retsu + 1 Loop Until Cells(gyo, retsu) = "" lin = Mid(lin, 2) arr(gyo - 1) = "{" & lin & "}," gyo = gyo + 1 Loop Until Cells(g
► 2023 (1) ► 3月 (1) ► 2022 (3) ► 4月 (2) ► 2月 (1) ► 2021 (3) ► 7月 (2) ► 6月 (1) ► 2020 (1) ► 5月 (1) ► 2019 (1) ► 9月 (1) ► 2018 (2) ► 6月 (1) ► 3月 (1) ► 2017 (15) ► 7月 (1) ► 6月 (3) ► 5月 (2) ► 4月 (3) ► 3月 (1) ► 2月 (3) ► 1月 (2) ► 2016 (26) ► 12月 (5) ► 11月 (3) ► 10月 (3) ► 9月 (1) ► 8月 (3) ► 7月 (2) ► 6月 (1) ► 5月 (2) ► 4月 (4) ► 2月 (1) ► 1月 (1) ▼ 2015 (18) ► 12月 (1) ► 11月 (2) ► 8月 (2) ► 7月 (2) ► 5月 (1) ► 4月
Office 2013を使用していて便利&不便なのが[ヘルプ]です。 オンラインの場合、ヘルプ画面からキーワードを検索すると必要な情報をピックアップされ便利だと私は感じています。 その反面、オフラインになると極端に使い勝手が悪い! 特にVBAはオフラインで関数等を調べられませんので、オフラインでVBAを使った業務アプリケーションを開発する時は自分自身の脳内を検索するしかありません。 今回はOffice 2013 VBA用オフライン ヘルプ ファイルの取得方法をメモ。 製品のオフライン ヘルプはしっかり用意されています 下記画像はAccessのヘルプ画面です。 オンラインとオフラインのヘルプが完備されています。 Excelでindirect関数を調べるとしっかり表示されます。 VBA用はない!ならば、ダウンロードしましょう Office 2013 VBA用オフライン ヘルプは標準ではありませ
第四回 数値に単位が混じっても計算できる!?Excelの表示形式を知っておこう! 2011年7月28日 Excel 普段、あまりにも何気なく使っているため、意外とちゃんとは使えないExcelの「表示形式」のお話です。 入力した数値を「通貨スタイルで表示」したり、「パーセントで表示」する程度のことであれば、日常的に使っているので問題ないのですが、ちょっと変わった形式で表示する際に表示形式の「ユーザー定義」を使いこなせるかどうかが、作業効率や作業のできる・できないに影響します。 例えば、以下の例のようなケースに迷わず対処できますか? 読み間違えないように“単位”も入力したいけど・・・ 下の例の「単価」と「1箱単価」のように、一見すると見間違えてしまいそうな数値を入力した表を作成する場合には、相手が見間違えることのないように数値に「単位」を付けて表示してあげると親切です。 しかし、ここで問題があ
本当は怖いExcel(エクセル)の話は、マネジメントのための新感覚Excel講座です。放っておくと業務効率が大変なことになるかもしれませんよ・・・ リモートワークの時代、どうやって業務効率化を図るか・・・。 経営者・マネージャーとしての手腕が試される時がやってきました。 さて、大変ご無沙汰しております。マス夫です。 お会いしていない間に、世の中ではリモートワークが一気に浸透しましたね。 そこで大活躍するのが、Googleスプレッドシート。 既にご存知だとは思いますが、Googleスプレッドシートとは、Google上で使える表計算ソフトのことで、その機能はExcelとほとんど同じ。 では、なぜリモートワークではGoogleスプレッドシートが重宝されるのか? それは、便利すぎる「共有機能」があるから。 今回は、このGoogleスプレッドシートの共有機能についてご紹介いたします。 使いこなすこと
Chandoo.orgのエントリーから、見栄えがよく、分かりやすいエクセルのグラフを作成する5つのテクニックとカラフルにデザインされた73のエクセルのテンプレートを紹介します。 How to NOT spend $ 150,000 and still dress up your charts 色の代わりにグラデーションやパターンを使用したグラフ 色の代わりに画像を使用したグラフ 注目するポイントにテキストを配置したグラフ オリジナルの色を使用したグラフ ラベルに画像を使用したグラフ デザインされたグラフの73のテンプレート [ad#ad-2] 色の代わりにグラデーションやパターンを使用したグラフ グラフの配色にフラットな色ではなく、グラデーションやパターンを使用します。 スライドに使用する際は、グラデーションを控えめに。 グラフを右クリックし、「データ系列の書式」を表示します。 「パターン
エクセル技道場 エクセル(Excel)の効率的な使い方、条件付き書式・入力規則などの機能をさらに便利に使いこなす技、組み合わせて使う関数の技など「技」の数々を紹介したページです。ショートカットキー、エクセル関数の読み方と語源リストなどの便利な一覧表もあります。 現在、エクセルの技の総数は約350です。
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く