私はPHPExcelクラスを使用してExcelファイルに書き込みます。
私の質問は、上付き文字を使用してセルにデータを書き込む方法です。私の値が( M<sup>3</sup>)
M 3(Excelの場合)の場合
// $data['dataLashing'][$i]['units_name'] - it`s a value from db in LOOP
$getExcelObject
->mergeCells("A$startRow:E$startRow")->setCellValue("A$startRow",$data['dataLashing'][$i]['material'])
->mergeCells("F$startRow:G$startRow")->setCellValue("F$startRow",$data['dataLashing'][$i]['units_name'])
->mergeCells("H$startRow:I$startRow")->setCellValue("H$startRow",$data['dataLashing'][$i]['quantity']);