5
내 데이터베이스의 컨텐츠를 xls 형식으로 내보내는 레일 어플리케이션이 있습니다.두 개의 인덱스가 같은 행에 있습니다.
같은 행에 넣지 않고 두 개의 개별 테이블을 만들려고합니다. 동일한 행에 두 개의 색인이 있어야합니까?
그리고이 같은 행에 두 루프를주지 않고 내가 가능하면 달성하기 위해 노력하고있어입니다 :
<?xml version="1.0"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:html="http://www.w3.org/TR/REC-html40">
<ss:Worksheet ss:Name="Sheet">
<Table>
<% @data.each do |data| %>
<Row ss:Index="1">
<Cell ss:Index="1"><Data ss:Type="String"><%= data.name %></Data></Cell>
</Row>
<% end %>
<% @moreData.each do |moreData| %>
<Row ss:Index="1">
<Cell ss:Index="2"><Data ss:Type="String"><%= moreData.name %></Data></Cell>
</Row>
<% end %>
</Table>
</ss:Worksheet>
</Workbook>
이
내가 위의 코드가 무엇을
잘 모르겠습니다. 같은 행에 두 항목을 모두 원하는 것처럼 보이지만 같은 행에 두 항목을 원하지 않는다고 말합니다. Excel에서 손으로 직접 편집 할 때 스프레드 시트로 실제로 할 수있는 것입니까? – Phil