public static void AppendRowDef(StringBuilder sb, TableParser table) { sb.Append("(struct "); AppendTableNameToLocalStructName(sb, table); sb.Append("Row\n"); int typeRowIndex = table.FirstRowIndex - 2; int nameRowIndex = table.FirstRowIndex - 1; Excel.Range item; for (int i = table.FirstColumnIndex; i < table.FinalColumnIndex; ++i) { string fieldName = table.GetCellText(i, nameRowIndex, out item); string fieldType = table.GetCellText(i, typeRowIndex, out item); sb.Append(" ("); AppendTableColumnTypeToSXYType(sb, fieldType, table); sb.Append(" "); AppendTableColumnNameToSXYIdentifier(sb, fieldName, table); sb.Append(")\n"); } sb.AppendFormat(")\n"); }
private static string GetId(TableParser table) { Excel.Range item; table.GetCellText(3, table.FirstRowIndex, out item); return(item.AddressLocal[true, true].Replace('$', ' ')); }