【文章內(nèi)容簡(jiǎn)介】
MyRng In (原始數(shù)據(jù)文件[原始數(shù)據(jù)文件]) , 3, True, , , , True 39。只讀方式打開(kāi)原始數(shù)據(jù)文件 (, 2) = FileDateTime() 39。記錄原始文件的最終修改時(shí)間 MyNamePath = (, 4) amp。 \ MyNamePath, 3, False, , , , True 39。讀寫方式打開(kāi)對(duì)賬工作簿 With Workbooks().Sheets(房款) .Rows(2: amp。 .).Delete End With For Each MySht In Worksheets MyRows = If 基礎(chǔ) And 日?qǐng)?bào)數(shù)據(jù) Then If (MyRows, 1) Then 39。表格后面無(wú)空行時(shí)添加一行 (). AlwaysInsert:=True MyRows = MyRows + 1 End If 39。讀入原始數(shù)據(jù) Workbooks().Sheets().Range().Copy (MyRows, 1).PasteSpecial Paste:=xlPasteValues, _ Operation:=xlNone, SkipBlanks:=False, Transpose:=False If = 房款 Then Workbooks().Sheets(房款).Cells(2, 1).PasteSpecial Paste:=xlPasteValues, _ Operation:=xlNone, SkipBlanks:=False, Transpose:=False Workbooks().Close Savechanges:=True End If 39。讀入原始數(shù)據(jù)完成 End If Next MySht 39。備份原始數(shù)據(jù) MyWordbookName = (, 5) amp。 銷售數(shù)據(jù) amp。 Format(Day(Date), 00) amp。 .xlsm 39。設(shè)置備份文件名稱 MyNamePath = amp。 \備份\ amp。 MyWordbookName 39。設(shè)置備份文件路徑和名稱 Kill MyNamePath Workbooks().SaveAs MyNamePath Workbooks(MyWordbookName).Close Savechanges:=False 39。備份完成,關(guān)閉備份的文件 Next MyRng 39。 下一個(gè)原始數(shù)據(jù)文件 39。完成原始數(shù)據(jù)讀入 39。形成日?qǐng)?bào)數(shù)據(jù) With ShtJC 39。(基礎(chǔ)) For Each MyRng In .Range(分期[分期]) 39。遍歷分期數(shù)據(jù)行 MyRow = For I = 0 To 3 39。范圍(本日、本月、本年、項(xiàng)目) For J = 0 To 2 39。狀態(tài)(0認(rèn)購(gòu)1簽約2退房) Set MySht = (日?qǐng)?bào)數(shù)據(jù)) If (2, 1) Then 39。如果不是空表格就增加一個(gè)新空行 (日?qǐng)?bào)數(shù)據(jù)). AlwaysInsert:=True End If MyRows = 39。記錄表格最后一行以方便后面插入數(shù)據(jù) 39。把數(shù)據(jù)寫入日?qǐng)?bào)數(shù)據(jù)表 (MyRows, 1) =