例如以下代码:Select Case e.StripItem.Name
Case "导出"
Dim t As WinForm.Table = e.Form.Controls("Table1")
If t.Visible = False Then
MessageBox.Show("查询结果中没有可导出的记录!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
Else
Dim dlg As New SaveFileDialog '定义一个新的SaveFileDialog
dlg.CellStyle = True
dlg.Filter = "Excel文件|*.xls" '设置筛选器
dlg.FileName = "往来查询导出-" & e.Form.Controls("ComboBox_关键字").Text & "-" & e.Form.Controls("ComboBox_合同或代码").TEXT
If dlg.ShowDialog = DialogResult.Ok Then '如果用户单击了确定按钮
Tables(e.Form.Name & "_Table1").SaveExcel(dlg.FileName, "往来查询导出") '保存文件
End If
End If
End Select
执行上面代码后生成的EXCEL报表中数字格式不是0.00,如何使EXCEL中的单元格格式与FT中Table表中一致,谢谢!
[此贴子已经被作者于2018/5/2 20:34:20编辑过]