Tag: 项目pipe理

vba,试图改变一个打开的文件夹地址

基本上我想打开一个Windows资源pipe理器,并浏览打开的窗口。 改变打开的窗口本身的path。 我想了一个方法来获得当前的窗口path,虽然它不帮助我: Set abc = CreateObject("Shell.Application") for each cell in abc.windows – gives us all the opened windows if cell.name = "File Explorer" 'etc 以及如何打开一个窗口: Application.ThisWorkbook.FollowHyperlink Address:="D:\", NewWindow:=True 有更多的方法来做到这一点,在shell中做到这一点: Shell("explorer.exe " & "c:\", vbNormalFocus) 基本上我的整个问题是如何改变一个打开的窗口地址,我的意思是,我可以find它作为一个对象与shell.application,我如何继续从这里? 另外,我如何使一个无形的打开资源pipe理器? ty提前。

使用任务pipe理器打开Excel文件,运行macros,保存文件,然后closures

我想每天早上5点打开一个excel文件,运行一个macros,它将数据和文件pipe理器/数据组织起来,保存并closures文件。 我目前有任务pipe理器与.vbs脚本来打开下面的文件,并打开文件,但它closures保存窗口popup,并尝试将文件保存为原件的副本。 Option Explicit Dim xlApp, xlBook Set xlApp = CreateObject("Excel.Application") xlApp.Visible = True ' Import Add-Ins 'xlApp.Workbooks.Open "G:\CNC\Schiermeyer\Active Job Files\Autorefresh" "C:\<pathOfXlaFile>\MyMacro.xla" 'xlApp.AddIns("MyMacro").Installed = True 'Open Excel workbook Set xlBook = xlApp.Workbooks.Open("G:\CNC\Schiermeyer\Active Job Files\Autorefresh\AutoRefresh Active Job Report.xlsm", 0, True) ' Run Macro xlApp.Run "sheet1.ActiveJobReportRefresh" xlBook.Close xlApp.Quit Set xlBook = Nothing Set xlApp = Nothing WScript.Quit […]

将用户特定的数据从Excel表单导入Active Directory / Exchange

我想从Excel表单(姓名,部门,电话等)自动分配数据到可用的AD用户。 哪种编程/脚本语言或LDAP-API对于这个问题是实用的? 有没有人有一些例子?

大量的excel列 – 隔离唯一的SKU ID

我在Excel中有两个大的列,每列表示一个SKU ID。 列A是我们网站上的旧列表。 B列是新的列表 我需要一个公式,可以让我看到在新列表中没有findSKU ID,所以我们可以从堆中删除它们。 任何帮助将是伟大的。 我正在试图解决这个问题。 菲尔

使用applescript移动名称出现在Excel电子表格中的文件

我有一个包含大约4000个图像文件的文件夹。 我需要根据他们的名字是否出现在Excel电子表格中来select其中的一些文件,并将它们复制到一个新的文件夹中。 如果可能的话,我也想用一个颜色标签来标记它们,这样我就知道原始文件夹中的哪些文件被移动了,哪些不是。 我从这里得到了下面的代码。 tell application "Microsoft Excel" tell worksheet 1 of active workbook set fileList to value of used range end tell end tell set rootFolder to "path/to/sourcefolder" as POSIX file set filesToMove to {} repeat with thisItem in fileList try set end of filesToMove to alias (rootFolder & thisItem) on error display dialog […]

清除内存分配Excel VBA – 堆栈 – 内存 – 永久内存分配

我有一个大约7MB的工作簿,每隔几周就会打破。 这是我以前的post。 VBA Intermittent ByRef错误 – 格式化function 经过一番小小的努力,看起来这个问题可能与Excel的内存分配有关。 它似乎开始抛出错误的有效代码。 通常是一个ByRef。 这可能是一个暂时的堆栈问题,但似乎更持久,因为它是在几次运行后发生的。 任何想法如何pipe理Excel的自动备份或其他永久性的​​内存分配? 长话短说,我不得不每两周复制并粘贴我的新代码到备份中,我认为这有点傻。 我确信在SO的专家的帮助下,有更好的方法来pipe理这个问题。 任何帮助表示赞赏。 谢谢!

如何使用jQuery IE浏览器将表格导出为Excel

我想在Internet Explorer中使用jQuery将表导出为ex​​cel我已经看到他们在Chrome和Mozilla上运行的所有脚本,但是我想要一个适用于Internet Explorer的代码。 而我的脚本是这样的。 exportExcel : (function() { var uri = 'data:application/vnd.ms-excel;base64,' , template = '<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head><!–[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]–></head><body><table>{table}</table></body></html>' , base64 = function(s) { return window.btoa(unescape(encodeURIComponent(s))) } , format = function(s, c) { return s.replace(/{(\w+)}/g, function(m, p) { return c[p]; }) } return function(table, name) { if (!table.nodeType) table = document.getElementById(table) var […]

在excel vba中调用macros后不能释放内存

我一直在这里四处查看其他问题,但无法find我的主题的解决scheme。 我注意到,每次我调用Excel中的VBA中的macros,实际上通过Microsoft脚本控制运行一些Python代码,macros使用的内存不释放,虽然我设法将例程内使用的所有内容设置为Nothing(和最终调用Python脚本中的垃圾收集器)。 代码如下: Sub save_rt() Dim lc As MSScriptControl.ScriptControl Set lc = New MSScriptControl.ScriptControl lc.Language = "python" lc.Timeout = 50000 'in sec workingdir = Range("xmldir").Cells.Value lc.ExecuteStatement ("import pandas as pd") lc.ExecuteStatement ("import numpy as np") lc.ExecuteStatement ("import gc") myvalues = Range("icap_cf_values").Cells n_righe = UBound(myvalues) n_colonne = UBound(myvalues, 2) lc.ExecuteStatement ("myvalues = []") For i = […]

Excel VBA:通过命名pipe道进行通信

我试图通过VBA中的named pipe设置通信不幸的是,由于某种原因,它永远不会到达Debug.Print "Connected在服务器Debug.Print "Connected ,也没有客户端连接。似乎是一个简单的情况,但一直试图让这个去小时。 服务器 Public Sub Server() Const szPipeName = "\\.\pipe\bigtest" Dim hPipe As Long, readVal As Long, readBytes As Long, sendVal As Long, sentBytes As Long Dim sa As SECURITY_ATTRIBUTES 'Create the NULL security token for the pipe pSD = GlobalAlloc(GPTR, SECURITY_DESCRIPTOR_MIN_LENGTH) res = InitializeSecurityDescriptor(pSD, SECURITY_DESCRIPTOR_REVISION) res = SetSecurityDescriptorDacl(pSD, -1, 0, 0) […]

无法使用VBA中的string调用VB.NET COM DLL函数

我用一个简单的testing函数实现了一个VB.NET DLL: <ComVisible(True)> Function TestString ( <MarshalAs(UnmanagedType.BStr)> xyz As String) As <MarshalAs(UnmanagedType.BStr)> String Dim y As Integer TestString = "Hello" End Function 这个function很简单。 在VBA中,我适当地声明了这个函数: Public Declare Function TestString Lib "myDLL.dll" (xyz As String) As String 从VBA我也显然加载DLL。 然而问题是,当我运行这样的function: Dim st as String st = "Hello" Debug.Print TestString(ByVal st) 我收到一条消息说错误的DLL调用约定。 另一方面,当我删除<MarshalAs(UnmanagedType.BStr)>function工作,但打印"Hello"后不久崩溃。 我究竟做错了什么?