回复 6楼wzw的帖子
我测试的结果是如下:
FarPoint.Web.Spread, Version=7.40.20132.1
IE8、IE9
- <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Web_LoadExcel_7DataTable.aspx.cs" Inherits="Spread_6_LoadExcel.Web_LoadExcel_7DataTable" %>
- <%@ Register assembly="FarPoint.Web.Spread, Version=7.40.20132.1, Culture=neutral, PublicKeyToken=327c3516b1b18457" namespace="FarPoint.Web.Spread" tagprefix="FarPoint" %>
- <!DOCTYPE html>
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head runat="server">
- <title></title>
- <meta http-equiv="x-ua-compatible" content="IE=9">
- </head>
- <body>
- <form id="form1" runat="server">
- <div>
- <FarPoint:FpSpread ID="FpSpread1" runat="server" BorderColor="Black" BorderStyle="Solid"
- BorderWidth="1px" Height="200px" Width="400px" ActiveSheetViewIndex="0"
- currentPageIndex="0"
- EnableTheming="True">
- <TouchInfo SelectionGripperLineColor=""></TouchInfo>
- <CommandBar ButtonFaceColor="Control" ButtonHighlightColor="ControlLightLight" ButtonShadowColor="ControlDark">
- <Background BackgroundImageUrl="SPREADCLIENTPATH:/img/cbbg.gif"></Background>
- </CommandBar>
- <Sheets>
- <FarPoint:SheetView SheetName="Sheet1">
- </FarPoint:SheetView>
- </Sheets>
- <TouchStrips>
- <FarPoint:TouchStrip Area="Chart" NoTouchStrip="True"></FarPoint:TouchStrip>
- </TouchStrips>
- <TitleInfo BackColor="#E7EFF7" ForeColor="" HorizontalAlign="Center" VerticalAlign="NotSet" Font-Size="X-Large"></TitleInfo>
- </FarPoint:FpSpread>
- </div>
- </form>
- </body>
- </html>
- Public Partial Class Web_LoadExcel_7DataTable
- Inherits System.Web.UI.Page
- Protected Sub Page_Load(sender As Object, e As EventArgs)
- If Not IsPostBack Then
- Dim table As DataTable = Me.CreateTable()
- Me.FpSpread1.Sheets(0).DataSource = table
- Me.FpSpread1.VerticalScrollBarPolicy = ScrollBarPolicy.AsNeeded
- Me.FpSpread1.HorizontalScrollBarPolicy = ScrollBarPolicy.AsNeeded
- End If
- End Sub
- Private Function CreateTable() As DataTable
- Dim table As New DataTable()
- For i As Integer = 0 To 199
- table.Columns.Add("AAA" & i)
- Next
- For i As Integer = 0 To 99
- table.Rows.Add(New Object() {Nothing})
- Next
- Return table
- End Function
- End Class
复制代码 |