i have an excel with three columns (item, price, qty) and i need to extr开发者_如何学Pythonact this data to a dictionary object using VBScript. how do i do this?
2 ways of doing this are
- Connect to the Excel workbook via ADO, and treat it as a database. This allows you to run SQL queries against your data to extract your required information. See this. The reference is for VBA and VB but it's easily adapted for VBScript
- Open the workbook using the Excel.Application OLE automation object. Something like this is quite easy to find on the internet. This method is similar to using VBA API as you would do within Excel itself and so means you can record macros in VBA and easily adapt them to VBScript.
If you post more information about what you've tried so far or more details of your problem I might be able to give you an example specific to you
精彩评论