Can I navigate a WebBrowser control to embedded image inside Excel file?

I have an .xlsm file with an ActiveX Microsoft Web Browser control (“Shell.Explorer.2”). I use VBA to open an image inside of it: WebBrowser.Navigate Application.ActiveWorkbook.Path & “\image.gif” I know that if I put an image on the worksheet it will be saved inside the .xlsm file. Such images are stored in the .xlsm (which is […]

VBA macro convert non-ascii part of string to HEX encoded

In my Excel 2013/2016 I am using online lookup for customer name and company and I am using online database query via GET URL parameter. With ASCII characters all goes fine, I just need to replace spaces to + signs, like this: Replace (SearchString, ” “, “+”) Then URL looks like this: But PROBLEM […]

VBA Macro, Formatting Excel Sheet to Sum by Index and Account

I have more formatting questions I am looking at a transaction sheet that has Index #’s (Column C) and Account #’s (Column E). I need to total all the entries in an entire Index, and then be able to total the all the entries in an Account. I have some code I was playing with, […]

How to autocomplete a line with data suggestion?

Context: In my company, some assistants fill out an Excel table, which is a users list (First Names, Last name, ID number). After, I use this list with a PowerShell script. But very often the users list is not correctly completed. For example, assistants forget to input ID number… .So i would like help assitants […]

Response.ClientDisconnectedToken' threw an exception of type 'System.PlatformNotSupportedException

I using a method which name is “ExportData() for downloading file Method: ExportData() protected void ExportData(string fileName, string fileType, string content) { Response.Clear(); Response.Buffer = true; Response.AddHeader(“content-disposition”, “attachment;filename=” + Server.UrlPathEncode(fileName)); Response.Charset = “”; Response.ContentType = fileType; Response.Output.Write(content); Response.Flush(); Response.End(); } If I call this method in page_load then its working fine. But if I call […]

Copy filtered range, paste skip blanks

I’m trying to filter a sheet, and copy the results to another sheet. Some columns contain formulas that I don’t want to copy over, as the destination sheet is blank aside from those columns (filled with different formulas). I’m clearing the contents of these cells with a separate macro. Disclaimer; my knowledge of Excel VBA […]

Use a different formula in another cell when different values from a drop down list are selected?

I have two columns in excel. In each row in column A I have a drop down list where you can choose between Asset Type A and Asset Type B. Depending on whether A or B is selected, the adjacent cell in column B should use a different formula to calculate some inputs. How can […]

how to auto adjust excel when dynamically generate from the c# code

When i click the download button, the excel will download based on the existing input. But it is not showing the content correctly. it has collapsed. I want to do this in a auto adjust rows and column when i download this.. My code here: using (MemoryStream mem = new MemoryStream()) { SpreadsheetDocument spreadSheet = […]

“object invoked has disconnected from its clients” Excel 2016

I have seen this asked multiple times but none of the solutions offered have solved my issue- I continue to get this error even though I have used the same code in multiple other applications with no errors. I have included the code below and hope that someone can spot the issue that I am […]

VBA – Copy Range and Paste to new sheet, shifting Entire Rows down?

I am trying to address the code highlighted in Bold, starting at “With ShNew.” I take the range, copy columns A:B to LastRow, and insert them into a “Sh3” at the Last row. Sh3 last row is a Total row, everytime I run the code, it inserts the pasted data, but overwrites my total row […]

MS Excel Spreadsheet is the best Office Software, Excel VBA and Excel Formulas make Spreadsheet work faster.