excel

VBA Excel File staying open in the background

﹥>﹥吖頭↗ 提交于 2021-01-29 10:54:29
问题 I am currently using a module on Microsoft Access to Open an Excel file and paste the results into an email. The module is working properly, but the Excel file is remaining open in the background. This is causing an issue when I try to run the same module using the same file. The Excel file I am using also automatically updates a date field, so I also need the close call to save the file beforehand, or ignore the save changes pop-up. Public Function emailPaste(exFile As String, exSheet As

pandas create separate dataframe for each excel sheet

你。 提交于 2021-01-29 10:52:30
问题 I have an excel file with about 20 sheets. Each sheets contain different type of data I would like to loop the excel and create a data frame for each of these sheets with data frame name equal to the sheet name. Tried different solution without success 回答1: You can create dictionary of DataFrames by parameter sheet_name=None in read_excel: dfs = pd.read_excel(fileName, sheet_name=None) print (dfs['sheetname1']) print (dfs['sheetname2']) 来源: https://stackoverflow.com/questions/52538718/pandas

Insert Dynamically in Excel using image from server path

岁酱吖の 提交于 2021-01-29 10:46:46
问题 I have code below to look for an image of a sku in a specific folder in our server and insert /autosize - but the issue i have is that if I send this spreadsheet to anyone else not on the server, they cannot see images. Can someone help fix this so it inserts the image dynamically? I believe this is what has to be done to place the actual image in the sheet rather than link-back when the sheet is updated/Opened. Or, how can I format this to send out and include images if they are not linked

Export Crystal Report To Excel - Specify Directory

喜你入骨 提交于 2021-01-29 10:43:53
问题 I have crystal reports (using C#) that I pull and want to export to Excel. I manage to pull and export the report just fine. But in the code I manually specify the export directory. Code: myEquipCalRPT.ExportToDisk(ExportFormatType.Excel, "C:\\Temp\\ReportName.xls"); I know the path must be a string value. How can I ask the user where he/she wants to export the report to (and give it a name) instead of manually specifying the path in the code? I tried using "SaveFileDialog" with the code

VBA: DoCmd Transferspreadsheet

心不动则不痛 提交于 2021-01-29 10:41:14
问题 Im trying to import an excel worksheet into Access table. Here is my code: Sub test2() Dim xlApp As Object Set xlApp = CreateObject("Excel.Application") xlApp.Visible = False Dim fd As Object Set fd = xlApp.Application.FileDialog(msoFileDialogFilePicker) Dim selectedItem As Variant If fd.Show = -1 Then For Each selectedItem In fd.SelectedItems Debug.Print selectedItem DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel12, "POR", selectedItem, True, "POR Plan!A1:Z100" Next End If Set fd

Run-Time Error 287 when retrieving Outlook email properties from Excel

微笑、不失礼 提交于 2021-01-29 10:36:07
问题 I am facing a "Run-time error 287" when accessing Outlook emails via Excel VBA. However, I'm getting this message only when run the script in Office 2013, with an Exchange account assigned to my Outllok client. When running in Office 2019, with my personal Outlook.com email address assigned to the client, it runs fine, doing what is expected to be done. Dim olApp As Outlook.Application Dim olNamespace As Outlook.Namespace Dim olFolder As Outlook.MAPIFolder Dim olMailItem As Outlook.MailItem

Parsing and extracting cell references from Excel formulas?

本小妞迷上赌 提交于 2021-01-29 10:34:52
问题 I am looking to parse and extract cell references from Excel formulas. Let's say I have the following formula inside cell P5 : =SUM(P1:P4)+Q3 I am looking for an output of the location of the cells involved for the formula to produce an answer, i.e. P1 , P2 , P3 , P4 , Q3 as output (their location/representation in some other form is acceptable too). My question is whether there is such kind of parser available to accomplish this and if not, what technique I should adopt. Perhaps the formula

How to delete entire row when case sensitive duplicates are found in Excel (for 100k records or more)?

↘锁芯ラ 提交于 2021-01-29 10:30:56
问题 This is a follow up question from How to remove duplicates that are case SENSITIVE in Excel (for 100k records or more)? . Since his code procedure manipulates the data of column A only, I'd like to also delete the entire row of data if case-sensitive duplicate is found. Case sensitive meaning: Case1 case1 cASE1 Are all unique records. 回答1: You can use a Dictionary to check for binary uniqueness and variant arrays to speed things up. To use the dictionary you will need to include a reference

Get “href=link” from html page and navigate to that link using vba

|▌冷眼眸甩不掉的悲伤 提交于 2021-01-29 10:28:21
问题 I am writing a code in Excel VBA to get href value of a class and navigate to that href link (i.e) here is the href value I want to get into my particular Excel sheet and I want to navigate to that link automatically through my VBA code. <a href="/questions/51509457/how-to-make-the-word-invisible-when-its-checked-without-js" class="question-hyperlink">How to make the word invisible when it's checked without js</a> The result I'm getting is that I'm able to get that containing tag's class

Run Time Error when running a VBA string to remove unique duplicates

妖精的绣舞 提交于 2021-01-29 10:20:56
问题 So I initially asked how to remove unique duplicates based on case sensitivity (please refer to the link below: Excel: Removing Duplicates Based On Case Sensitivity and ultimately I was guided to the following link: How to remove duplicates that are case SENSITIVE in Excel (for 100k records or more)? This time I'm using column q to test out the formula and so far the following formula works: Sub duptest() Sheets("Analysis").Select Dim x, dict Dim lr As Long lr = Cells(Rows.Count, 1).End(xlUp)