以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  请指教.无法出报表  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=119780)

--  作者:SZDVYE
--  发布时间:2018/5/31 18:56:00
--  请指教.无法出报表


Dim StartDate As Date
Dim EndDate As Date
With RibbonTabs("控制版面")("功能")
    StartDate = .Items("StartDate").Value
End With
With RibbonTabs("控制版面")("功能")
 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:日报表系统.rar

    EndDate = .Items("EndDate").Value
End With
If StartDate = Nothing
    MessageBox.Show("请录入起始 和 结束日期")
Else
DataTables("日报表").LoadFilter = "[日期] >= #" & StartDate & "# And [日期] <= #" & EndDate & "# "
DataTables("日报表").Load()
Dim nms As List(of String) = DataTables("日报表").GetUniqueValues("","所属")
For Each nm As String In nms
    Dim Book As New XLS.Book(ProjectPath & "Attachments\\日统计表-表格.xls")
    Dim d As Date = DataTables("日报表").Compute("Max(日期)", "所属 = \'" & nm & "\'")
    Dim fl As String = ProjectPath & "Attachments\\" & nm &"-"& d.Year &"年"& d.Month &"月"&"-日统计表.xls"    
    
    Dim Sheet As XLS.Sheet = Book.Sheets(0)
    Sheet(6, 14).Value = "<所属 = \'" & nm & "\'>"
    Book.Build() \'生成细节区
    Book.Save(fl) \'保存工作簿
Next
End If


问题如下:

.NET Framework 版本:2.0.50727.5477
Foxtable 版本:2018.3.9.1
错误所在事件:菜单,日报表,Click
详细错误信息:
打开存储文件失败。


--  作者:有点甜
--  发布时间:2018/5/31 20:52:00
--  

 

    Dim Book As New XLS.Book(ProjectPath & "Attachments\\日统计表-表格.xlsx")