spreadsheetGetCellFormat

説明

スプレッドシート内の指定したセルの形式を取得します。

戻り値

以下のキーを持つ構造体:

  • alignment
  • bgcolor
  • bold
  • bottomborder
  • bottombordercolor
  • dataformat
  • fgcolor
  • fillpattern
  • font
  • fontsize
  • indent
  • italic
  • leftborder
  • leftbordercolor
  • rightborder
  • rightbordercolor
  • rotation
  • strikeout
  • topborder
  • topbordercolor
  • textwrap
  • underlineverticalalignment

履歴

  • ColdFusion(2025 リリース):関数が追加されました。

シンタックス

spreadsheetGetCellFormat(spreadsheetObject,row,column)

パラメーター

名前

 

 

必須

 

 

Type

 

 

説明

 

 

spreadSheetObject

 

 

はい

 

 

ExcelInfo 

 

 

セルの形式を取得する Excel スプレッドシートオブジェクトです。

 

row

 

 

はい

 

 

Integer 

 

 

セルの行番号です。

 

 

column

 

 

はい

 

 

Integer 

 

 

セルの列番号です。

 

 

<cfquery name=&quot;art&quot; datasource=&quot;cfartgallery&quot;>
    SELECT * FROM ART
</cfquery>
<cfscript>
    theFile=GetDirectoryFromPath(GetCurrentTemplatePath()) & &quot;art.xls&quot;;
    // スプレッドシートオブジェクトを作成します
    theSheet=spreadsheetNew(&quot;SampleData&quot;)
    // クエリから行を追加します
    spreadsheetAddRows(theSheet,art)
   // writeOutput(theFile)
    
    // セルの書式設定の構造を定義します
    myFormat=StructNew();
        myFormat.color=&quot;blue&quot;;
        myFormat.bold=&quot;true&quot;;
        myFormat.underline=&quot;true&quot;;
        myFormat.alignment=&quot;center&quot;;
        myFormat.rotation=45;
        myFormat.italic=&quot;true&quot;
    // セル(10,5)に書式を設定します
    SpreadsheetFormatCell(theSheet,myFormat,11,5)
    spreadsheetWrite(theSheet,theFile,&quot;yes&quot;)
    // セルの書式を取得します
    cellFormat=spreadsheetGetCellFormat(theSheet,11,5)
    writeDump(cellFormat)
</cfscript>

Adobe, Inc.

ヘルプをすばやく簡単に入手

新規ユーザーの場合