Tag: 命名空间

无法findtypes或名称空间名称“SqlBulkCopy”

有人可以帮我解决这个错误。 这是我的代码: using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data.SqlClient; using System.Data.OleDb; using System.Data; using Microsoft.ApplicationBlocks.Data; using System.Configuration; OleDbConnection ExcelCon = new OleDbConnection(); ExcelCon.ConnectionString = "Provider=Microsoft.Ace.OLEDB.12.0;Data Source=C:\\Users\\pc\\Documents\\ExcellTest.xlsx;Extended Properties=\"Excel 12.0;HDR=Yes\""; SqlConnection SqlCon = new SqlConnection(); SqlCon.ConnectionString = @"workstation id = PC-PC; user id=sa;Password=sapassword; data source=pc-pc; persist security info=True; initial catalog=CleanPayrollTest2"; string sSQLTable […]

Excel中的XML名称空间

我试图在Excel中使用OpenStreetMap旅行时间来构build距离matrix。 我使用YOURS API和Google Maps API excel模块作为参考( http://oco-carbon.com/2012/05/17/a-google-maps-journey-time-function-for-excel/ ) 。 这是我想要带入Excel的XML示例: http : //www.yournavigation.org/api/1.0/gosmore.php? format = xml&flat=60.480398&flon=22.277206& tlat= 60.402923& tlon= 22.355558& v=汽车及快= 1&层= Mapnik的 目前我的VB代码如下所示: Function G_TIME(Flat As String, Flon As String, Tlat As String, Tlon As String) As Double ' Requires a reference to Microsoft XML, v6.0 ' Draws on the stackoverflow answer at bit.ly/parseXML […]

在VBA中引用行名称

我有一个简单的VBA脚本来隐藏/显示基于另一个单元格的值的行。 但我似乎无法引用基于名称的行..只有行号(随着我添加其他的东西!) If Not Intersect(Target, Range("CB10.2")) Is Nothing Then Select Case Target.Value Case Is = "Yes": Rows("36:36").EntireRow.Hidden = False Case Else: Rows("36:36").EntireRow.Hidden = True End Select End If 我想要做这样的事情,但得到一个'types错配': If Not Intersect(Target, Range("CB10.2")) Is Nothing Then Select Case Target.Value Case Is = "Yes": Rows("CB10.3").EntireRow.Hidden = False Case Else: Rows("CB10.3").EntireRow.Hidden = True End Select End If […]

如何在Python中导入COM对象名称空间/枚举?

我是相对较新的编程/ python,所以我会很感激任何帮助,我可以得到。 我想通过COM使用Excel将excel文件保存为特定的格式。 这里是代码: import win32com.client as win32 def excel(): app = 'Excel' x1 = win32.gencache.EnsureDispatch('%s.Application' % app) ss = x1.Workbooks.Add() sh = ss.ActiveSheet x1.Visible = True sh.Cells(1,1).Value = 'test write' ss.SaveAs(Filename="temp.xls", FileFormat=56) x1.Application.Quit() if __name__=='__main__': excel() 我的问题是如何指定FileFormat,如果我不明确知道它的代码? 浏览文档我find关于FileFormat对象的引用。 我无法知道如何访问XlFileFormat对象 ,并以我可以find它的枚举值的方式导入它。 谢谢!