以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  [讨论]导出Excel出错  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=88140)

--  作者:pcxjxjhkw
--  发布时间:2016/7/27 17:26:00
--  [讨论]导出Excel出错

导出Excel出错,提示数值字段溢出

如何解决,谢谢


--  作者:大红袍
--  发布时间:2016/7/27 17:27:00
--  
 编写什么代码导出?做个实例看看。
--  作者:pcxjxjhkw
--  发布时间:2016/7/27 17:29:00
--  
Dim tv As WinForm.TreeView = e.Form.Controls("TreeView1")
Dim dlg As New FolderBrowserDialog
If dlg.ShowDialog = DialogResult.Ok Then
    \' MessageBox.Show("你选择的目录是:" & dlg.SelectedPath,"提示")
    For Each nd As WinForm.TreeNode In tv.AllNodes
        If nd.Level = 1 AndAlso nd.Checked Then
            e.Form.Text = "导出【" & nd.Name & "】表中,请稍后..."
           
            Dim ex As New Exporter
            ex.SourceTableName = nd.Name \'指定导出表
            ex.FilePath = dlg.SelectedPath & "\\"  & nd.Name & ".xls" \'指定目标文件
            ex.Format = "Excel" \'导出格式为Excel
            ex.Export() \'开始导出
        End If
    Next
End If
e.Form.Text = e.Form.Name
MessageBox.Show("导出结束")

--  作者:大红袍
--  发布时间:2016/7/27 17:33:00
--  
 数据问题,做个foxtable例子发上来。
--  作者:pcxjxjhkw
--  发布时间:2016/7/27 19:58:00
--  
高速导出又没问题。
--  作者:大红袍
--  发布时间:2016/7/27 20:10:00
--  
 做个实例发上来看看。