以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  如果表和字段名是英文,标题是中文,如何导出中文excl数据  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=139297)

--  作者:weibu
--  发布时间:2019/8/10 10:17:00
--  如果表和字段名是英文,标题是中文,如何导出中文excl数据
1.如果表和字段名是英文,标题是中文,如何导出中文excl数据?就是狐表Syscmd.Project.QuickExport(),这个导出功能




2.我想导出excl中含有 indentify 这个默认的关键字列,如何导出?





3.下面代码,我想导入的是中文列名的excl。是不是只要把Dim excel列() As String = {"proclass", "probrand", "probar","procode","proname","momunit","sonunit","unitno","sourcetype","prospecs","timesafe","prostate","checkbar","商品ID"}  这个列名改成我想要的中文就行了?


Dim dt As DataTable = DataTables("rs_productinfo")
Dim 列名() As String = {"proclass", "probrand", "probar","procode","proname","momunit","sonunit","unitno","sourcetype","prospecs","timesafe","prostate","checkbar","proid"}
Dim excel列() As String = {"proclass", "probrand", "probar","procode","proname","momunit","sonunit","unitno","sourcetype","prospecs","timesafe","prostate","checkbar","商品ID"}

Dim Result As DialogResult
Result = MessageBox.Show("确定要导入吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If Result = DialogResult.Yes Then
    Dim dlg As New OpenFileDialog
    dlg.Filter = "Excel文件|*.xls"
    dlg.MultiSelect = True \'允许选择多个文件
    If dlg.ShowDialog =DialogResult.OK Then
        Dim Book As New XLS.Book(dlg.FileName)
        Dim Sheet As XLS.Sheet = Book.Sheets("商品信息")
        dt.ResumeRedraw()
        dt.StopRedraw()
        \'systemready = False


--  作者:有点蓝
--  发布时间:2019/8/10 10:34:00
--  
1/2,只能手工导出,如:http://www.foxtable.com/webhelp/topics/1148.htm

3、是的