Questions tagged [excel]

Only for questions on programming against Excel objects or files, or formula development. You may combine the Excel tag with VBA, VSTO, C#, VB.NET, PowerShell, OLE automation, and other programming related tags and questions if applicable. Do NOT use with other spreadsheet software like [google-sheets].

Microsoft Office Excel is a spreadsheet application written and distributed by Microsoft for Microsoft Windows and macOS. It features calculation, graphing tools, sorting and filtering data, pivot tables and a macro programming language called Visual Basic for Applications (VBA).

Languages and environments for programming against Excel include:

Questions tagged with should be version-agnostic. More specific tags include:

Version-specific tags include , , , , , , , , , ,

Microsoft Excel 2010 Microsoft Excel 2010 on Windows 7

More information

Useful resources

Official logo

Microsoft Excel official logo

Logo image source: https://products.office.com/en-au/products

281899 questions
16
votes
7 answers

In Excel, can I use a hyperlink to run vba macro?

I have a spreadsheet that has many rows of data. I would like to be able to click on a cell that will run a macro using the data from that row. Since the number of rows will always be changing, I though a hyperlink for each row might be the best…
Jason
  • 444
  • 2
  • 7
  • 21
16
votes
7 answers

How to convert a matrix to a single column using Excel

I have the following matrix in Excel: 3 Columns: A, B, C Row 1: a b c Row 2: d e f Row 3: ghi What I need is a single column with all these values. The result should look like that: a b c d e f g h i The TRANSPOSE function doesn't work for that…
Sebastian
  • 394
  • 1
  • 2
  • 14
16
votes
2 answers

How to format a datetime so that Excel will understand it?

I have a script which outputs a CSV file. How should I format dates or date+time fields so that Excel will correctly parse that field as a date? PS: I'd like to keep timezone information intact as well.
nickf
  • 537,072
  • 198
  • 649
  • 721
16
votes
4 answers

What does the number in the AddChart2 VBA macro represent?

I've use my Excel 2013 to record a macro in inserting a chart, a column-clustered chart in my case. In the view code option, it shows me a line of code as below: ActiveSheet.Shapes.Addchart2(286,xl3DColumnClustered).Select Please help me as I…
OneBaseNotch
  • 183
  • 1
  • 2
  • 7
16
votes
6 answers

Capitalizing first letter of strings

I am trying to capitalize the first letter string sent in the array arr. The part of the code that does not work is the Right function, which causes the code to return an error. What could be the fix? For Each sent In arr sent = UCase(Left(sent,…
brietsparks
  • 4,776
  • 8
  • 35
  • 69
16
votes
5 answers

List of data.frame's to individual excel worksheets - R

I have a list of data.frame's that I would like to output to their own worksheets in excel. I can easily save a single data frame to it's own excel file but I'm not sure how to save multiple data frames to the their own worksheet within the same…
Barnaby Hussey-Yeo
  • 647
  • 2
  • 8
  • 15
16
votes
1 answer

Pandas: parse merged header columns from Excel

The data in excel sheets is stored as follows: Area | Product1 | Product2 | Product3 | sales|sales.Value| sales |sales.Value | sales |sales.Value Location1 | 20 | 20000 | 25…
Samarth Bharadwaj
  • 559
  • 2
  • 5
  • 15
16
votes
6 answers

Conditionally formatting cells if their value equals any value of another column

I have data in the A and B columns. B column's data is mostly duplicates of A's data, but not always. For example: A Budapest Prague Paris Bukarest Moscow Rome New York B Budapest Prague Los Angeles Bukarest I need to search the A column for the…
PeterInvincible
  • 2,230
  • 5
  • 34
  • 62
16
votes
3 answers

The import org.apache.poi.xssf can not be resolved

I've created Maven project and in pom.xml, I've mentioned following POI dependency in order to read from and write to excel file: org.apache.poi poi
Alpha
  • 13,320
  • 27
  • 96
  • 163
16
votes
1 answer

Easiest way to create a color gradient on excel using python/pandas?

So I have data that I am outputting to an excel file using pandas' ExcelWriter. After the entire data is outputted to the Excel file, what is the easiest way to apply conditional formatting to it programmatically using Python? I want to be able to…
jenny
  • 771
  • 3
  • 12
  • 20
16
votes
2 answers

How do I read data from a spreadsheet using the OpenXML Format SDK?

I need to read data from a single worksheet in an Excel 2007 workbook using the Open XML SDK 2.0. I have spent a lot of time searching for basic guidelines to doing this, but I have only found help on creating spreadsheets. How do I iterate rows in…
ProfK
  • 49,207
  • 121
  • 399
  • 775
16
votes
6 answers

SSRS won't expand the row height when exported to Excel

I have a report I am doing with SSRS 2008 with some rows that have multiple elements inside them. On the preview the row automatically expands to support the extra elements but however when I export the report to Excel it appears only as a single…
BenYeomans
  • 383
  • 2
  • 7
  • 15
16
votes
10 answers

CopyPicture method of range class failed - sometimes

I have a VBA code which I am using to copy ranges as a picture and paste them into a chart. It does this so I can save it into a picture. This code has like a 70% success rate, and when it doesn't work, it gives out the error "CopyPicture method of…
Horace
  • 252
  • 2
  • 4
  • 15
16
votes
5 answers

How I can install the PHPExcel library in laravel?

I was considering to download the library from its home page (http://phpexcel.codeplex.com/wikipage?title=Examples) but also do not know what folder should I place it. How I can install?
TuGordoBello
  • 4,350
  • 9
  • 52
  • 78
16
votes
3 answers

Excel Countif Not equal to string length of zero

I have a formula an iferror formula that puts in "" if an error occurs. This is a zero length string. I'd like to do a count if not equal to "". =countif(A:A,<>"") 'is not a valid formulas =countif(A:A,"<>") 'checks for actual blanks, not zero…
user2242044
  • 8,803
  • 25
  • 97
  • 164
1 2 3
99
100