Ticket #4151

ActiveXオートメーションでExcelが上手く操作できない
Date d'ouverture: 2004-04-07 01:02 Dernière mise à jour: 2004-04-07 01:02

Rapporteur:
Propriétaire:
(Aucun)
Type:
État:
Ouvert
Composant:
(Aucun)
Jalon:
(Aucun)
Priorité:
5 - moyen
Sévérité:
5 - moyen
Résolution:
Aucun
Fichier:
Aucun

Détails

下記、コードにてエクセルのセルに文字列を入力したいが
全ての表示が1行目になってしまう。

// エクセルにデータを入力するテスト
var excelapp = WScript.CreateObject
("Excel.Application");
excelapp.Workbooks.Add(); // 新シート作成
excelapp.Visible = true; // excelを表示

var sheet = excelapp.Worksheets('sheet1');
for (var col = 1; col <= 10; col++)
{
for (var row = 1; row <= 30; row++)
{
var value = "座標(" + row + "," + col + ")";
sheet.Cells(row, col).Value = value;
}
}

Ticket History (0/0 Histories)

Attachment File List

No attachments

Modifier

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Connexion