开发者

assign value without open excel file

开发者 https://www.devze.com 2023-02-06 20:38 出处:网络
Imports Microsoft.Office.Core Imports Microsoft.Office.Interop Impor开发者_C百科ts Microsoft.Office.Interop.Excel

Imports Microsoft.Office.Core Imports Microsoft.Office.Interop Impor开发者_C百科ts Microsoft.Office.Interop.Excel

I have this code:

Dim oApp As New Excel.Application()
Dim wb As Excel.Workbook

wb = oApp.Workbooks.Open("D:\NoriaMail\23120011\LPO Summary per Month_View 3 - AllMonths.xlsx")

can anybody tell me how can I assign value to wb witout open the file (I want another function to give wb value without open the file)

thank's for help


What type of value do you want to "assign"? Some sort of metadata? In my experience, your code above is the correct way to open the file; from there, you can begin manipulating the file.

0

精彩评论

暂无评论...
验证码 换一张
取 消