내가/구조/A의 GridView를 템플릿 형식을 수있는 방법에 대한 도움이되도록 엑셀 스프레드 시트의 셀의 내용처럼 디스플레이 : 여기 의 GridView 템플릿
<li>"looking to display data from column1 here between the li tags"</li>
<p>"and data from column2 here between the p tags"</p>
<!-- and so row two from excel/objDataset1 would do the same -->
<li>"data from column1 here"</li>
<p>"data from column2 here"</p>
etc...
가 나는 이름을 얻기 위해 사용되는 코드입니다 엑셀에서 범위가있는 gridview에 파일 :
Dim sConnectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0;" _
& "Data Source=" & Server.MapPath("Spreadsheet.xls") _
& ";" & "Extended Properties=Excel 8.0;"
' original code was: & "Data Source=" & Server.MapPath("../ExcelData.xls") _ ' ???
Dim objConn As New OleDbConnection(sConnectionString)
objConn.Open()
' Create new OleDbCommand to return the data from the worksheet/RangeName.
Dim objCmdSelect As New OleDbCommand("SELECT * FROM RangeName", objConn)
Dim objAdapter1 As New OleDbDataAdapter()
objAdapter1.SelectCommand = objCmdSelect
Dim objDataset1 As New DataSet()
' Fill the DataSet with the information from the worksheet/RangeName.
objAdapter1.Fill(objDataset1, "XLData") ' ?!?!?
' Build
GridView1.DataSource = objDataset1.Tables(0).DefaultView
GridView1.DataBind()
objConn.Close()
---------------------------- 난 후 비트 --------------------------------------
<!-- It doesn't do much a present but it does display the info -->
<asp:GridView ID="GridView1" runat="server" style="height: 182px"
BackColor="Transparent"
BorderColor="#DEDFDE"
BorderStyle="None"
BorderWidth="1px"
CellPadding="4"
ForeColor="Black"
GridLines="None">
<RowStyle BackColor="Transparent"
/>
<FooterStyle BackColor="#CCCC99" />
<%-- <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
<SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />--%>
<%-- I do not want to show the column header info from the excel file - which is coming through - also --%>
<AlternatingRowStyle BackColor="Transparent" />
</asp:GridView>
나는 심지어 내가있는 gridview 또는 뭔가를 사용해야하는지 모른다 - 당신은 스프레드 시트보고하고자하는 경우에 너무 좋은 당신이 할 수있는 경우에 간단하게 ...
무엇 당신이 그것을 할 싶지 않아 지금하고 있습니까? 아니면 뭘 더 원합니까? – Rap