How do I create an Excel (.XLS and .XLSX) file in C# without installing Microsoft Office?

How can I create an Excel spreadsheet with C# without requiring Excel to be installed on the machine that's running the code?

How to use Java Script in Excel macros?

I am not a programmer and have a very very limited knowledge about both VB coding and Java scripting. I have a software which can be currently run through a Java script. The software does some...

Can I read Excel files using the OleDbConnection Excel ACE Driver from a non-seekable System.IO.Stream rather than a file?

There's a similar question here In Memory OleDbConnection to Excel File but, this question was answered by avoiding it completely by doing it another way. Here's some example code which uses an...

Insert line break in wrapped cell via code

Is it possible to insert line break in a wrapped cell through VBA code? (similar to doing Alt-Enter when entering data manually) I have set the cell's wrap text property to True via VBA code, and...

Use VBA to Clear Immediate Window?

Does anyone know how to clear the immediate window using VBA? While I can always clear it myself manually, I am curious if there is a way to do this programmatically.

Using Javascript in Excel

I'm currently creating an Excel workbook that runs a Monte Carlo type simulation. The simulator code is currently in Javascript though, and porting entirely to VBA appears to be non-trivial given...

Exporting numeric vector as character to CSV

Let the following vectors: x <- c(123456789123456789, 987654321987654321) y <- as.character(x) I'm trying to export y into a csv file for later conversion into XLSX (don't ask, client...

Attaching a Textbox to a point or line on a chart in Excel/VBA

I was wondering how to attach a textbox to a point or line in an Excel chart for the macro I am working on. I have been using the .AddTextbox method such...

What do excel xml cell attribute values mean?

Looking at the xml of an excel spreadsheet, I see these cells under sheetData/row: <c r="T1" s="23" t="s"><v>17</v></c> <c r="AP1" s="98"><v>28</v></c> By looking at the spreadsheet, I can see...

Converting column letter to number

I found code to convert number to column letter. How can I convert from column letter to number? Sub colLtr() Dim mycolumn mycolumn = 1000 Mcl = Left(Cells(1, mycolumn).Address(1, 0), InStr(1,...

Excel Power Query - convert date time from UTC to Local

I'm connecting to an MS SQL database via Power Query (Version: 2.10.3598.81) in Excel 2010. My dates are stored in UTC in the database, however I would like to show them as local in the...

How to detect if user select cancel InputBox VBA Excel

I have an input box asking user to enter a date. How do I let the program know to stop if the user click cancel or close the input dialog instead of press okay. Something like if str=vbCancel then...

How to read excel file in angularjs?

I have tried to read excel file to follow the following tutorial. http://code.psjinx.com/xlsx.js/ But I have failed to read excel file for undefine situation in the following highlighted line.......

Run javascript function on cells of CSV / excel file

I have a javascript function here (view page source) that converts all the simple-text content of a text box into Unicode Devnagri script, following a character substitution algorithm, and outputs...

How to declare an Active Worksheet in a variable?

I'm trying to keep a variable to the currently open worksheet in VBA. So far I have Dim Active As Worksheet Set Active = ActiveWorksheet For some reason it gives me an error in the last line,...

Make a http get Request from Excel through a Proxy with default credentials

I want to get data from a Website(just a simple webrequest), from an Excel, the only problem is, the application is behind a proxy and i don't want to hardcode Username and Password. Is there a...

Populating cells with text using VBA

I want to select a value from one sheet and put it in a cell on a different sheet. My script determines the proper value but I cannot get the value into the sheet. This function returns the !Value...

How to convert 32 bit VBA code into 64 bit VBA code

Im trying to run a macro code but since I'm using a 64 bit Excel 2016 this code is not working. Please help me how to fix this. Private Declare Function FindWindowEx Lib "User32" Alias...

How to compare Excel files

How Can I compare large excel files? Suppose I have two exports of a database table (acceptance and production) with columns identifiable as key columns. Now I want to compare two files and...

Excel formula to return value instead of TRUE or False

I am very newbie in excel, I wanted to make my formula to return matched value instead of TRUE/FALSE =NOT(NOT(SUM(--NOT(ISERR(SEARCH($D$2:$D$21;$B2)))))) is there anyway this formula can be...

Banker's rounding formula in Excel

It is a well known problem that by default, .NET uses Banker's rounding whereby X.5 is rounded to nearest even number. Excel, on the other hand uses arithmetic rounding where X.5 is always rounded...

How to apply WorksheetFunction.CountIfs depending on time?

I am trying to count records on Sheet2. Dim wksdata As Worksheet Dim xyz as String Dim Time as String Set wksdata = Sheets("Data") Time = Date + TimeValue("08:00:00") 'Set Time value as todays...

Using DeepL API to translate text

Is there any possibility to find out if the DeepL translator offers an API for the translation? Unfortunately I haven't found any information on this. Would like to implement this to an Excel...

Closed XML change entire row background color based on cell value

I'm trying to color an entire row based on a cell selection(value).I want to change the color of the row just for the used range in my worksheet but not for unused cells. Here's the code I have...

load json into excel using office js web addin

if I have json string which looks like this: [{"id":1,"name":"manish"},{"id":1,"name":"John"}] can I just office js to simply load it in table. I saw this...

Using Python to load template excel file, insert a DataFrame to specific lines and save as a new file

I'm having troubles writing something that I believe should be relatively easy. I have a template excel file, that has some visualizations on it with a few spreadsheets. I want to write a scripts...

Why do I get an Automation Error when copy-pasting shapes with an Excel macro, but not if I slow down the code?

When I try to copy-paste some existing shapes into cells depending on the value of the cells, my macro will fail after few copies (less than 10) with the following error: Run-time error...

Make cursor jump to same row, different column when pressing Enter, with other specific requirements

I've had a look about and whilst I've found some similar threads (with varying degrees of relevancy/usefulness), none of them covered my exact situation. I want to use a sheet in my workbook as a...

Skip error "The document caused a serious error the last time it was opened"

Is it possible to skip error "The document caused a serious error the last time it was opened"? I use Excel to opening Word files. I would like to prevent situation, when e.g. pc reboots while...

How to create an Excel (.xlsx) file in Apache Camel?

I am trying to create an Excel file and send it to the SFTP location using the Apache Camel. I can create a PSV from a Java object like this: Java POJO: @CsvRecord(separator = ",", skipFirstLine...