以文本方式查看主题 - 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=19381) |
-- 作者:kevin -- 发布时间:2012/5/8 13:39:00 -- 创建EXCEL文件的问题 我使用以下代码:创建EXCEL文件和动作 Dim v As Integer = e.form.Controls("TextBox1").Value Dim vv As Integer = e.form.Controls("TextBox2").Value Dim vvv As Integer = e.form.Controls("TextBox3").Value Dim App As New MSExcel.Application Dim Wb As MSExcel.Workbook = App.WorkBooks.Add Wb.WorkSheets(1).name = (vv) Wb.WorkSheets(1).range("A1").Value = (v) Wb.SaveAs("d:\\123.xls") \' 在这里,我希望能够:根据TextBox3录入的内容做为文件名称,并默认保存到D:\\EXCEL\\文件夹下面.请教老师!!!\' App.Quit |
-- 作者:don -- 发布时间:2012/5/8 13:48:00 -- Dim v As Integer = e.form.Controls("TextBox1").Value Dim vv As Integer = e.form.Controls("TextBox2").Value Dim vvv As Integer = e.form.Controls("TextBox3").Value if wv isnot nothing then Dim App As New MSExcel.Application Dim Wb As MSExcel.Workbook = App.WorkBooks.Add Wb.WorkSheets(1).name = (vv) Wb.WorkSheets(1).range("A1").Value = (v) Wb.SaveAs("D:\\Excel\\" & wv & ".xls") \' 在这里,我希望能够:根据TextBox3录入的内容做为文件名称,并默认保存到D:\\EXCEL\\文件夹下面.请教老师!!!\' App.Quit End if
|