使用Excel VBA更新SharePoint列值

时间:2018-05-29 14:05:21

标签: excel-vba sharepoint-online vba excel

我已经在Excel工作簿中成功编写了一些VBA代码,使用特定单元格中的值将工作簿保存到SharePoint列表中以生成文件名,这非常简单:

Sub submitapproval()
ThisPath = "https://recupeit.sharepoint.com/sales/Costing%20Sheets/"
ThisRep = ThisWorkbook.Sheets("Quotation").Range("E11").Value
ThisCustomer = ThisWorkbook.Sheets("Quotation").Range("B8").Value
ThisDescription = ThisWorkbook.Sheets("Quotation").Range("B9").Value
ThisCost = ThisWorkbook.Sheets("Hardware Costing Sheet").Range("J25").Value
ThisTotal = ThisWorkbook.Sheets("Hardware Costing Sheet").Range("E25").Value

ActiveWorkbook.SaveAs Filename:=ThisPath & ThisCustomer & " - " & 
ThisDescription & ".xlsm"

End Sub

我上传的文档库有3列,我需要用工作簿中的数据填充我已经拥有的值:

ThisRep
ThisCost
ThisTotal

我无法找到关于如何实现这一目标的简单答案。有人能指出我正确的方向吗?

谢谢, 史蒂芬

0 个答案:

没有答案