DATAGRID导到EXECL表中字符少0,急啊————求大神给力
前台代码FONT><asp:datagrid style="Z-INDEX: 0" id="gv_HandReport" runat="server" Width="959px" AutoGenerateColumns="False" Height="258px" Font-Size="12px" OnItemDataBound="gvUsers_RowDataBound">
<SelectedItemStyle Font-Bold="True" ForeColor="White" BackColor="#669999"></SelectedItemStyle>
<ItemStyle ForeColor="#000066"></ItemStyle>
<HeaderStyle Font-Bold="True" ForeColor="White" BackColor="#006699"></HeaderStyle>
<FooterStyle ForeColor="#000066" BackColor="White"></FooterStyle>
<Columns>
<asp:BoundColumn DataField="ID" HeaderText="id"></asp:BoundColumn>
<asp:BoundColumn DataField="VendorAccount" HeaderText="代号"></asp:BoundColumn>
<asp:BoundColumn DataField="VendorName" HeaderText="供应商"></asp:BoundColumn>
<asp:BoundColumn DataField="CustomsID" HeaderText="物料代号"></asp:BoundColumn>
<asp:BoundColumn DataField="CustomsName" HeaderText="物料名称"></asp:BoundColumn>
<asp:BoundColumn DataField="Unit" HeaderText="单位"></asp:BoundColumn>
<asp:BoundColumn DataField="Amount" HeaderText="数量"></asp:BoundColumn>
<asp:BoundColumn DataField="InvoiceAmount" HeaderText="金额"></asp:BoundColumn>
<asp:BoundColumn DataField="InvoiceCode" HeaderText="发票号码"></asp:BoundColumn>
<asp:BoundColumn DataField="InvoiceDate" HeaderText="开票日期" DataFormatString="{0:yyyy-MM-dd}"></asp:BoundColumn>
<asp:ButtonColumn Text="del" CommandName="edit" HeaderText="删除"></asp:ButtonColumn>
</Columns>
</asp:datagrid>
下面这是我网上找的代码,没报错,但是没反应,求大神帮忙!!!!
Protected Sub gvUsers_RowDataBound(ByVal sender As System.Object, ByVal e as DataGridItemEventArgs)
If e.Item.ItemType = ListItemType.Item.EditItem Then
e.Item.Cells(3).Attributes.Add("style", "mso-number-format:\@;")
End If
End Sub