您的位置:

js日历考勤表代码,日历考勤表怎么弄的

js日历考勤表代码,日历考勤表怎么弄的

更新:

本文目录一览:

考勤表上面代码代表什么意思

在考勤表中,具体的符号分表代表的意思如下:

出勤(√)、旷工(X)、正休(◆)、事假◇、出差(▼)、换休(▽)、丧假(●)、产假(○)、病假(※)婚假(◎)

sql中使用两个join后出现了每行记录重复大约九次的情况

select 11月考勤表.name as 姓名,

员工表.card as 卡号,

11月考勤表.bmmc as 部门,

11月考勤表.skrq as 刷卡日期,

11月日历.weeks as 星期,

11月考勤表.sksj as 刷卡时间

into monthdata

from 11月考勤表 inner join 11月日历 on kqrq=skrq join 员工表 and 11月考勤表.no=员工表.no

where skrq between '2007-11-01' and '2007-11-30'

在join 前加个inner

在只有join的情况下,被认为是full join ,也就是笛卡尔积了,所以会重复N多数据.

我想在EXCEL中以日历形式做一个考勤表,怎么做呢?

首先,要会先做个日历……

然后再依人数,班段,数据量等因素设计显示方式,最后套公式写代码什么。

考勤表时间没有打上指纹在异常考勤表里怎么填时间

Sub 签到记录()

Sheets("签到记录").Activate

Range(Cells(2, 1), Cells(100, 100)).Select

Selection.ClearContents

Dim m_s1, m_s2, m_s3, m_s4 As String

Dim m_arr1 '存放打卡记录

Dim m_arr2 '存放日历及休日标记

Dim m_arr3 '存放员工清单

'Dim m_arr4(1 To 100, 1 To 31) As String '存放签到记录

Dim MAXROW1, MAXROW2, MAXROW3 As Integer

Dim i, j, k, l As Integer

Dim m_qdsj As String '临时存放签到时间

Dim m_dksj As String '临时存放打卡时间

Dim m_xm, m_bm As String '存放员工姓名/部门

Dim m_rq As Date

Dim m_rq2 As String

Dim dkjl As String '存放打卡记录

Dim sbsj As Date

Dim xbsj As Date

Dim bhZD 'key-姓名 item-编号

Dim dkrqZD 'key-编号+日期 item-序号

Dim dkrqArr(1 To 1000, 1 To 2) As Date '1-上班时间 2-下班时间

Dim dkrqJs As Integer

Dim xM As String, bH As Integer

Dim myDate As Date, myTime As Date

Dim myKey As String

Set bhZD = CreateObject("scripting.dictionary")

dkrqJs = 0

With Sheets("员工基本信息")

hh = 2

Do While .Cells(hh, 1) ""

xM = .Cells(hh, 1).Text

bH = .Cells(hh, 5).Value

bhZD.Add xM, bH

hh = hh + 1

Loop

End With

Set dkrqZD = CreateObject("

如何在excel表中插入日历表,我要制造考勤表 只要选择对应月份,日期就自动生成了

1、首先在日期的第一个单元格里输入=在点击上面的考勤表日期,如图。

2、然后第二个单元格里输入=第一个单元格+1,按回车,再然后右下角向右拉。

3、再下面的星期单元格里输入=上面的日期,如图。

4、点击回车,点击右下角向右拉动,如图。

5、选择日期那一行点击右键-设置单元格-日期,点击确定,如图(选择自己合适的日期)。

6、星期那一行点击右键-设置单元格-日期,点击确定,如图(选择自己合适的日期)。

7、最后已在考勤表那一行的日期随便输入几号,下面的日期跟星期就会随之而变动了,如图。

你好,请问如何把考勤表中的异常时间显示出来?

这个都是要用vba编程来实现的。

下面介绍一个实际应用案例。

第一步:每月从考勤机读取打卡数据导入excel表格。如图:

第二步:维护本月工作日。如图:

第三步:手动输入请假记录。如图:

第四步:自动计算打卡结果。如图:

第四步代码如下:

Sub 签到记录()

Sheets("签到记录").Activate

Range(Cells(2, 1), Cells(100, 100)).Select

Selection.ClearContents

Dim m_s1, m_s2, m_s3, m_s4 As String

Dim m_arr1 '存放打卡记录

Dim m_arr2 '存放日历及休日标记

Dim m_arr3 '存放员工清单

'Dim m_arr4(1 To 100, 1 To 31) As String '存放签到记录

Dim MAXROW1, MAXROW2, MAXROW3 As Integer

Dim i, j, k, l As Integer

Dim m_qdsj As String '临时存放签到时间

Dim m_dksj As String '临时存放打卡时间

Dim m_xm, m_bm As String '存放员工姓名/部门

Dim m_rq As Date

Dim m_rq2 As String

Dim dkjl As String '存放打卡记录

Dim sbsj As Date

Dim xbsj As Date

Dim bhZD 'key-姓名 item-编号

Dim dkrqZD 'key-编号+日期 item-序号

Dim dkrqArr(1 To 1000, 1 To 2) As Date '1-上班时间 2-下班时间

Dim dkrqJs As Integer

Dim xM As String, bH As Integer

Dim myDate As Date, myTime As Date

Dim myKey As String

Set bhZD = CreateObject("scripting.dictionary")

dkrqJs = 0

With Sheets("员工基本信息")

hh = 2

Do While .Cells(hh, 1) ""

xM = .Cells(hh, 1).Text

bH = .Cells(hh, 5).Value

bhZD.Add xM, bH

hh = hh + 1

Loop

End With

Set dkrqZD = CreateObject("scripting.dictionary")

With Sheets("打卡记录")

dkrqZD.RemoveAll

hh = 2

Do While .Cells(hh, 1) ""

If hh = 13 Then

xxx = 1

End If

bH = .Cells(hh, 1).Value

myDate = .Cells(hh, 2).Value

myTime = .Cells(hh, 3).Value

myKey = "" bH ";" Day(myDate)

If Not dkrqZD.exists(myKey) Then

dkrqJs = dkrqJs + 1

dkrqZD.Add myKey, dkrqJs

dkrqArr(dkrqJs, 1) = myTime

dkrqArr(dkrqJs, 2) = myTime

Else

If myTime dkrqArr(dkrqZD(myKey), 1) Then

dkrqArr(dkrqZD(myKey), 1) = myTime '上班时间

End If

If myTime dkrqArr(dkrqZD(myKey), 2) Then '下班时间

dkrqArr(dkrqZD(myKey), 2) = myTime

End If

End If

hh = hh + 1

Loop

End With

m_s1 = "打卡记录"

m_s2 = "本月工作日"

m_s3 = "签到记录"

m_s4 = "员工基本信息"

Sheets(m_s1).Select

MAXROW1 = Cells(Rows.Count, 1).End(xlUp).Row '找到A列最后一个有数据单元格的行号

m_arr1 = Range("A2:c" MAXROW1) '把单元格区域装入数组

Sheets(m_s2).Select

MAXROW2 = Cells(Rows.Count, 1).End(xlUp).Row '日历数

m_arr2 = Range("A2:c" MAXROW2) '把单元格区域装入数组

Sheets(m_s4).Select

MAXROW3 = Cells(Rows.Count, 1).End(xlUp).Row '员工清单人数

m_arr3 = Range("a2:d" MAXROW3) '把单元格区域装入数组

'计算签到时间 取当天打卡最早的时间

Sheets(m_s3).Select

'写入表头信息:第一行:日期 第二行:上班、下班

For i = 1 To MAXROW2 - 1

j = (i - 1) * 2 + 3

Cells(1, j) = m_arr2(i, 1)

Cells(1, j + 1) = myweek(m_arr2(i, 1))

Cells(2, j) = "上班"

Cells(2, j + 1) = "下班"

Next i

j = 3

For i = 1 To MAXROW3 - 1

If m_arr3(i, 4) = 0 Then

GoTo 100

End If

m_xm = m_arr3(i, 1)

m_bm = m_arr3(i, 2)

Cells(j, 1) = m_xm

Cells(j, 2) = m_bm

For k = 1 To MAXROW2 - 1

If m_arr2(k, 3) = "Y" Then '休息日不看打卡记录

GoTo 200

End If

k2 = 3 + (k - 1) * 2

m_rq = m_arr2(k, 1)

m_bj = 0

bH = bhZD(m_xm)

myKey = "" bH ";" Day(m_rq)

If dkrqZD.exists(myKey) Then

m_bj = 1

sbsj = dkrqArr(dkrqZD(myKey), 1)

xbsj = dkrqArr(dkrqZD(myKey), 2)

Else

m_bj = 0

End If

If m_bj = 0 Then

Cells(j, k2) = "未打"

Cells(j, k2 + 1) = "未打"

Else

If sbsj = TimeSerial(8, 35, 0) Then

Cells(j, k2) = "OK"

Else

Cells(j, k2) = "迟到"

End If

If xbsj = TimeSerial(17, 30, 0) Then

Cells(j, k2 + 1) = "OK"

Else

Cells(j, k2 + 1) = "早退"

End If

End If

200 Next k

j = j + 1

100 Next i

Sheets(m_s3).Select

End Sub

Function myweek(a)

Dim b As Integer

b = Weekday(a, 2)

Select Case b

Case 1

myweek = "一"

Case 2

myweek = "二"

Case 3

myweek = "三"

Case 4

myweek = "四"

Case 5

myweek = "五"

Case 6

myweek = "六"

Case 7

myweek = "日"

End Select

End Function

Sub 一键更新()

请假处理

外出处理

出差处理

调休处理

End Sub