Questions tagged [excel-automation]

Use of Excel components and functionality from code, instead of using the GUI

Excel components can be controlled by programs. VB can do it directly and actually all Excel macros are written in that language. But also, using COM-automation, you can use Excel functionality from programs written in many other languages.

126 questions
1
vote
1 answer

VBA Excel Automation (search for hundreds of little WorkBooks (same number of columns) to be queued in a unique Workbook

I wrote succesully in Visual Foxpro the research of the Workbooks in a specific customer's directory and subdir. Now I want, starting by the first Workbook, append the the second just below the first and so on... I wrote, attempting to have…
1
vote
1 answer

One opened workbook does not see other opened workbook

We have this oldschool software which opens new Excel workbook and fills it with data. It does not do anything more. The workbook stays unsaved and opened. Now I have created a macro which looks for this newly opened workbook by name (using…
1
vote
2 answers

How to create an array like this in powershell?

I need to store data like below for TextToColumns Excel automation. I need to implement Code-2 or Code-3 or Code-4 is that any way to achieve? I have more than 350+ data so I cant use Code-1, that's not fair for me. Code-1: working fine $var =…
1
vote
0 answers

I am trying to read excel file and its formulas and write them in new file by updating the formulas accordingly but got stuck to update them

I am trying to split excel spreadsheet based on columns and retain the formulas used in it. I was using openpyxl to read the formulas but got stuck as it reads formulas and write as it is but i need to modify them as well depending upon new splitted…
Laxman
  • 11
  • 3
1
vote
0 answers

Excel Automation without Interop

We have excel reports which are having connections from external sources. We need to refresh these connections in a day twice. We are already having an application for this which uses Interop. Now we want to get rid of Interop since server side…
SKV
  • 21
  • 1
1
vote
0 answers

openpyxl: left right border for merged cell

The documentation says need to change only the top-left cell of merge cells. ws.merge_cells(start_row=1, start_column=1, end_row=1, end_column=3) ws.cell(1,1).border=Border(right=Side(border_style='thick', color='000000'),…
Dr.PB
  • 959
  • 1
  • 13
  • 34
1
vote
1 answer

Excel: search if a specific keyword exists in a column

I was wondering if anyone out there can help to resolve the issue I am facing right now, actually I wanted to ask that I have 1 column with 5k + rows, and each row has a statement in it and if I search for a keyword , how come I can find out that…
1
vote
0 answers

Reading value from a cell & code alignment

I have been trying to fetch api data from a web service in the past couple of days. I am unable to do it in a more efficient way and I am not getting help on my request too. After trying for long, I somehow have managed to get it from Excel Power…
Sabha
  • 621
  • 10
  • 32
1
vote
1 answer

How to code the exception for a column in excel using pandas?

Sample data: | | Status | Failed | In Progress | Passed | Untested | |---|-------------------------|--------|-------------|--------|----------| | 2 | P0 Dry Run - 13/02/18 | 2.0 | | 143.0 | 5.0 | | 3 | P1…
1
vote
1 answer

why date-time is automatically changed to the object datatype?

Need to convert object type to Date-time and use that converted date-time is unknowingly changed to the object again while filtering. msft['Tested On'] = pd.to_datetime(msft['Tested On']) msft['Tested On'].dt.date df = msft[msft['Tested On'] ==…
1
vote
2 answers

How can I add an interaction to rows without assigning a button to each?

This is some what of an opinion quest, but it is regarding excel vba events I have a table that contains the history of our sales, but I want the user to be able to interact with each row in some way, so that it opens that sale in the editor. As…
Mojimi
  • 2,561
  • 9
  • 52
  • 116
1
vote
2 answers

How to get the columns of an excel sheet that have a specific string, and write them in a new excel file

I have excel file "file1" with a few sheets. I am interested in only one sheet, "sheet1" that has many columns, and I am only interested in few columns with specific name in that sheet (first row of the excel sheet contains the name of the…
Ari
  • 23
  • 4
1
vote
1 answer

Detect Version of Excel in Delphi

I am currently using the following code to check to see if the Excel Automation libraries exist on the user's computer: CoInitialize(nil); ExcelExists := true; try TestExcel := CreateOleObject('Excel.Application'); except ExcelExists…
lkessler
  • 19,819
  • 36
  • 132
  • 203
1
vote
1 answer

How to forward-declare _com_ptr_t pointers?

I want to create a library to wrap Excel Automation and expose just some of its vast functionality. I'm using the #import mechanism to work with Excel's COM, so right now I have: // EXCELAPP.H #import "C:\\PathTo\\mso.dll" //... #import…
MikMik
  • 3,426
  • 2
  • 23
  • 41
1
vote
1 answer

Exception calling "Open" with "1" argument(s): ..." in Excel after installing my addin

I have been trying to automate excel automation that installs our company addin in excel and then load the library file (library.xlsm that contains the library macro subroutines and functions). After this for each test, I load the corresponding…
Rishi
  • 980
  • 10
  • 21
1 2
3
8 9