以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  工资管理系统  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=82284)

--  作者:发财
--  发布时间:2016/3/15 10:53:00
--  工资管理系统
请问老师!有简单一点的工资管理系统的例子吗?
--  作者:大红袍
--  发布时间:2016/3/15 10:59:00
--  

去项目发布那里看看

 

http://www.foxtable.com/bbs/dispbbs.asp?BoardID=5&ID=6252&skin=0

 

http://www.foxtable.com/bbs/index.asp?boardid=5&page=

 


--  作者:发财
--  发布时间:2016/3/15 11:30:00
--  
Dim d As Date = vars("cc")
Dim Book As New XLS.Book(ProjectPath & "工资表.xls")
Dim Sheet As XLS.Sheet = Book.Sheets(d & "月")
For n As Integer = 1 To 20
    Tables("工资").Cols(n).name = Sheet(1,n+1).Value
Next
由EXCEL表导入表头到table表头,应如何改?

--  作者:大红袍
--  发布时间:2016/3/15 11:46:00
--  

参考代码

 

Dim csname() As String = {"AAA", "BBB"}
Dim Builder As New ADOXBuilder
Builder.Open()
With Builder.Tables("表A")
    For i As Integer = 0 To csname.length - 1
        .RenameColumn(Tables("表A").Cols(i).name, csname(i))
    Next
End With
Builder.Close()

DataTables.unload("表A")
DataTables.load("表A")


--  作者:发财
--  发布时间:2016/3/15 14:36:00
--  
如何用代码增加数据表的列?
--  作者:大红袍
--  发布时间:2016/3/15 14:58:00
--  

参考 http://www.foxtable.com/help/topics/2122.htm

 


--  作者:发财
--  发布时间:2016/3/15 15:42:00
--  
Dim d As Date = vars("cc")
Dim d1 As String = Format(d,"MM")
Dim s As String
Dim Book As New XLS.Book(ProjectPath & "工资表.xls")
Dim Sheet1 As XLS.Sheet = Book.Sheets(d1 & "月")
Dim Builder As New ADOXBuilder
Builder.Open()
Dim i As Integer = 0
With Builder.Tables("工资")
    If Tables("工资").Name.length < 38 Then
        .AddColumn("姓名" & i ,ADOXType.String ,12)
        s = Sheet1(6+i,1).Value
        .RenameColumn(Tables("工资").Cols(i).name,s)
        i = i + 1
    End If
End With
Builder.Close()
DataTables.unload("工资")
DataTables.load("工资")
请教老师,代码在那里出错?

--  作者:发财
--  发布时间:2016/3/15 15:48:00
--  
Dim d As Date = vars("cc")
Dim d1 As String = Format(d,"MM")
Dim s As String
Dim Book As New XLS.Book(ProjectPath & "工资表.xls")
Dim Sheet1 As XLS.Sheet = Book.Sheets(d1 & "月")
Dim Builder As New ADOXBuilder
Builder.Open()
With Builder.Tables("工资")
For i As Integer = 1 To 30
    \'If Tables("工资").Name.length < 38 Then
        .AddColumn("姓名" & i ,ADOXType.String ,12)
        s = Sheet1(6+i,1).Value
        .RenameColumn(Tables("工资").Cols(i).name,s)
    \'End If
Next
End With
Builder.Close()
DataTables.unload("工资")
DataTables.load("工资")
这样也不行?

--  作者:大红袍
--  发布时间:2016/3/15 16:16:00
--  

提示什么错?

 

Dim d As Date = vars("cc")
Dim d1 As String = Format(d,"MM")
Dim s As String
Dim Book As New XLS.Book(ProjectPath & "工资表.xls")
Dim Sheet1 As XLS.Sheet = Book.Sheets(d1 & "月")
Dim Builder As New ADOXBuilder
Builder.Open()
With Builder.Tables("工资")
    For i As Integer = 1 To 30
        s = Sheet1(6+i,1).Value
        If s > "" AndAlso Tables("工资").cols.Contains(s) = False Then
            .AddColumn(s ,ADOXType.String ,12)
        End If
    Next
End With
Builder.Close()
DataTables.unload("工资")
DataTables.load("工资")


--  作者:发财
--  发布时间:2016/3/15 16:59:00
--  
如何清除excel表的姓名中间的空格?