Microsoft Excel is a commercial spreadsheet application written and distributed by Microsoft for Microsoft Windows and Mac OS X.
2
votes
1answer
25 views
Write to a new, modified Excel file from an original one
I noticed that I've a HUGE bottleneck in this following function of mine. I can't see how to make it faster.
These are the profiling test results(keep in mind that I'm using a PyQt GUI so times can ...
5
votes
1answer
160 views
Drying Up Very Similar Implementations of an Interface
Work continues on the Rubberduck VBA Editor Add-in. I have a need to call some VBA code from the add-in with Application.Run. Unfortunately, the ...
1
vote
2answers
104 views
Excel-like column numbering [duplicate]
I have a working code (below) to convert a number to Excel-like (A...Z AA...AZ BA...BZ ...ZA-ZZ) column codes (headers).
For ...
5
votes
3answers
75 views
Building an OPC client in Excel
I am pretty deep into building a very multi-faceted little app in Excel with VBA. It does a number of tasks, all centered around using OPC to get tag values from several PLC's and doing various ...
7
votes
1answer
216 views
Improving performance of a VBA code to read contents of many .CSV files
I'm fairly new to VBA and just completed my first script. It's completing the task I want it to do just fine, but it's really slow* in doing so. It has to open and read about 1000 csv-files, for each ...
0
votes
1answer
59 views
Find a string in a Excel cell in the fastest way
I have to implement a "filter" in a Excel file which deletes/shows particular strings found in specified columns. I save the rows numbers that have to be deleted in a list. I have my filters in ...
5
votes
1answer
41 views
Conditionally copying cells from other worksheets
I wrote super redundant VBA code and it works and solve my problem. I am trying to simplify it but don't know where to start due to my limited knowledge in VBA.
Basically, this code works as a ...
3
votes
0answers
33 views
Tuning Excel calculation engine which uses MS Excel interop
I am currently building an Excel calculation engine. It's purpose is basically to wrap the calculation logic of an Excel workbook in order to use the logic from a C# library.
...
6
votes
1answer
133 views
Excel VBA binary search class module [closed]
I have a long list of sorted strings in a Workbook, and I have to find a lot of values in it. I was hoping to build a binary search Class Module that will find them for me faster than Excel's built-in ...
5
votes
1answer
89 views
Getting information of countries out of a website that isn't using consistent verbiage
From this website I needed to grab the information for each country and insert it into an Excel spreadsheet.
My original plan was to use my program and search each website for the text and later ...
5
votes
3answers
123 views
Parameterised Constructors
Finally, Parameterised Constructors are possible in VBA.
Background:
One rainy day, I came up with an idea: take a static class and expose one property as default (like it was done in the Reverse ...
4
votes
2answers
104 views
VBA Excel Game - Testing
My brother bet me that I couldn't make a game in Excel. The code is all over the place and buggy in parts. But I would appreciate it if anyone would give this game a go.
The music and the code has ...
3
votes
1answer
106 views
Insert variable number of rows
In the Excel vba sub below, I need to insert the number of rows equal to variable j after row k.
So if ...
2
votes
1answer
130 views
5
votes
2answers
109 views
Checking for missing values in several columns of a spreadsheet
Basically I had 3 columns of Data
Adjudicated Cases
Not Adjudicated Cases
All Cases
and I wanted to get a list of all the cases that were missing from Column A and Column B, with a little help ...
6
votes
4answers
120 views
Extracting key information from a directory of XML files
I have written some VBA to loop through a directory of 15,000 XML files and extract key information from these files into Excel - this is unbearably slow. Can someone please assist me in optimising ...
1
vote
2answers
87 views
Multi Threaded Report Generation
I have a requirement where i have to generate some report basically read from db and write data to Excel.
I want your help in reviewing following things in my code.
Data Base Connection
Multi ...
4
votes
2answers
115 views
Excel calculation engine
We have currently rewritten an Excel calculation engine in F# and are looking to refactor the code to make it a lot more idiomatic and standardised.
One of the big problems with the code is that we ...
6
votes
2answers
123 views
Updating Pivot Tables in Excel [closed]
I'm writing some code for someone to update a pivot table field based on the contents entered in a particular cell.
I am unfamiliar with VBA and programming for excel but I followed some tutorials ...
6
votes
1answer
114 views
Universal Spreadsheet reader/writer
I have a project that reads spreadsheets as a rectangular list of lists (matrix) transforms the matrix and then writes it to another spreadsheet. I want to be able to read from and write to multiple ...
4
votes
2answers
117 views
Traversing and printing complex Dictionary types (Scripting.Dictionary) - Dictionary inside of a Dictionary
Based on this SO post - also reposted on vba4all.com with a few more details and explanations.
Please notice there currently is no error handling whatsoever as I didn't analyse and consider any traps ...
3
votes
1answer
115 views
Searching a Word Document from Excel - v2.0
My first question:
Searching a Word Document from Excel
Since then I have implemented most of the suggestions by @RubberDuck and @Comintern. I have also added functionality for different-sized ...
8
votes
2answers
117 views
Searching a Word Document from Excel
Today I created a script in Excel that migrates data from a specific Word document and copies a portion of it to a cell in Excel (the date to be specific).
The file input is
Last name, First ...
4
votes
2answers
82 views
Finding matching strings in a column
I have col D (in sheet1 called Students), col A (in Sheet2 called Students too) and col B ...
4
votes
3answers
72 views
Inefficient (slow) loop with calculations in worksheet
I am looking for best practice help. Slow loops seem to be a recurring problem for me and I'd like to learn a better way. The code itself works as it should, except it is far too slow.
The problem ...
1
vote
1answer
223 views
Processing Excel files of a predefined template to generate output CSV files of another predefined template
I'm a freelancer and I recently wrote a python script that processes input xlsx files that contain data in a particular format and output a csv file in another format as required.
The code works well ...
9
votes
3answers
181 views
Speeding up execution time of worksheet-formatting code
I've been writing some code that places some data in an empty worksheet and then formats the sheet by adding borders to all of the used cells. The code functions how it should perfect, but it takes a ...
3
votes
1answer
62 views
Optimize spreadsheet-filling routine
I'm stuck with the slow VBA routine below, which I think is the cause of lagging (taking to long). I was wondering if there is a faster way to do this:
...
3
votes
3answers
139 views
A practical example of evenly distributing n lists into a single list
I had previously asked about how to evenly distribute the items in n lists into a single list and was referred to this question.
I made a practical example of my solution for this in VBA for Excel, ...
5
votes
3answers
3k views
Assigning value to cells with Excel VBA
I have an Excel Worksheet consisting of two columns, one of which is filled with strings and the other of which is empty. I would like to use VBA to assign the value of the cells in the empty column ...
8
votes
2answers
292 views
Optimize total code in one sub
I have the following code which works fine, but there has to be a faster way to do this. I want to have it all in one sub.
...
4
votes
1answer
71 views
Increasingly Long Runtime for Macro
My code works, but the problem is that it is taking an increasingly long time to run, with the time required to complete calculations increasing every time I use the macro. I've tried a variety of ...
5
votes
3answers
333 views
Read table row with multiple options
I developing an algorithm to read a row from a table (specifically, I'm reading from an Excel file).
I have three conditions about when to terminate the Read operation:
When an empty cell is found ...
6
votes
1answer
197 views
Possible memory leak in a for loop macro
I was reading about similar problems to the one I am having, and my guess is that I am having a 'memory leak'. I'm not sure exactly what that means, or how to correct it. Could you take a look at my ...
8
votes
2answers
69 views
How can I make this userform timer faster?
I have a userform that displays a goal time for workers to shoot for when completing a task. It also has a stopwatch on it that is controlled by a start, stop, and reset button on the userform. If the ...
2
votes
1answer
186 views
Improving performance in generating an Excel file
I am using this code to write more than 170,000 rows to an Excel document. All in all, the file generation process takes about 3 minutes total. (I've already shaved off about ten minutes by shaving ...
5
votes
2answers
322 views
VBA Function slower than Excel Formula
I've replaced the following horrendous Excel formula (values and names have been replaced):
...
4
votes
1answer
125 views
Ignore exceptions when changing column formula in Excel table
The new table feature on Excel is excellent and you can specify a column formula as well as exceptions on the column. However, if you want to change the column formula, Excel will rewrite the whole ...
6
votes
1answer
84 views
Test if Excel is open without relying on catching an error
Getting a hook on an open instance of Excel is something I do all the time. I'm now questioning if I'm doing this the best way. I'm particularly concerned with the fact that I rely on the ...
7
votes
3answers
272 views
Script for finding cheating students in a quiz
Below is a script to find cheating students in a quiz in a daily moodle activity log exported in .xls. It works fine and is written in a procedural way.
Essentially the script isolates the activity ...
5
votes
3answers
123 views
Improving performance of VBA batch scripts?
I am using a script to open a bunch of Excel files, copying two or more sheets into a new file and saving this new file. It sure beats doing it manually, but I think it could be faster.
Here's my ...
7
votes
3answers
174 views
Retrieving data from files in the folder
I am to use VBA code to simply retrieve certain data from all Excel files in certain folder and paste it in working spreadsheet. I am not sure that this is the most efficient (which matters as I would ...
11
votes
3answers
6k views
Validate and import data from an Excel file
I have recently designed a module which will do bulk upload for different contents. Basically the user will upload an Excel file, I will have to read and validate headers of excel then each value of ...
10
votes
2answers
198 views
Calculation of an inflation on volume/year
Background
I would like to find out if my current solution to the problem described below is "good enough" or if there is an alternative way of achieving it. All I care about is the length (no. of ...
5
votes
2answers
5k views
Extract Excel data using Interop.Excel from C# is very slow
Code Objective
I need to create a System.Data.DataSet object from an Excel workbook. Each DataTable within the ...
4
votes
2answers
219 views
Excel sheet code is taking too much time
I have an Excel sheet with lot of rows with data. I am separating it into 2 sheets with some condition satisfies.
This is taking too much time. How can I improve the speed? Please suggest any ...
10
votes
4answers
796 views
Looping through an Excel document in C#
Before looping through an Excel document using a library I found, and wanted to know how long it would take to loop through the whole thing.
There are 40k rows.
I looped through only the first 5k ...
6
votes
1answer
11k views
Reading data from Excel sheet with ExcelDataReader
Objective:
I want to import an Excel file, and read the rows of certain columns. For this, I use ExcelDataReader. I've implemented a low-level class called ...
4
votes
1answer
327 views
Ruby script to load xlsx files into mysql db
I put together this Ruby script (1.9.3) to load data into MySQL from many xlsx files that contain data entered by people. These files typically have many illegal characters and it has been difficult ...
5
votes
2answers
108 views
More efficient update macro in Excel
I have a macro that makes comparisons and then this macro exports all of the changes based on if the information doesn't match. I have it so that each column gets their own worksheet in the new ...