我有一个MASTER excel电子表格用作模板,因此我可以使用链接到我的数据透视表的新数据表刷新CONNECTION(.csv文件)。
现在我有一个宏可以保存为特定路径,因为我希望保持原始状态不变。
Sub SaveCopyPath()
With ActiveWorkbook
.SaveCopyAs "C:\Users\Me\" & Format(Date, "mmddyyyy") & "-" & [A1] & ".xlsm"
End With
End Sub
答案 0 :(得分:0)
这使用Sub SaveCopyPath()
Dim SavedCopy As Excel.Workbook
ActiveWorkbook.SaveCopyAs "C:\Users\Me\" & Format(Date, "mmddyyyy") & "-" & [A1] & ".xlsm"
Workbooks.Open "C:\Users\Me\" & Format(Date, "mmddyyyy") & "-" & [A1] & ".xlsm"
Set SavedCopy = ActiveWorkbook
With SavedCopy
.Worksheets("Data").ListObjects(1).Unlink
Application.DisplayAlerts = False
.Worksheets(1).Delete
.Worksheets(1).Delete
Application.DisplayAlerts = True
.Close True
End With
End Sub
方法删除数据连接。其余的应该是直截了当的:
<label for="existing-ads-client-name" class="big">CLIENT INFORMATION</label><br>
<div class="existing-ads-client-name">
<%=form_tag clients_path,class: 'search-client', method: :get do |f| %>
<div id="client-name">
<%=text_field_tag :name, params[:name] %>
</div>
<%=button_tag "Search", class: 'btn btn-default', name: nil %>
<% end %>
</div>