Questions tagged [excel]

Microsoft Excel is a commercial spreadsheet application written and distributed by Microsoft.

Filter by
Sorted by
Tagged with
14
votes
2answers
3k views

Avoiding repeated code in worksheet

Can someone help me make this code more professional? I'm trying my best to find something similar, but I wasn't successful. I want to avoid the repeat of the code for every single value and also I ...
5
votes
5answers
3k views

Importing a CSV file into Excel

I need help making this code run faster. I am using it to import a CSV file into Excel. It works, but it is very slow. The file is almost 20MB. ...
7
votes
1answer
414 views

Comparing tables and printing discrepancies

Here's my first VBA project. I have some very limited Python experience, and this is my first VBA project. I'm sure I could have done it a lot more simply, but I just stuck with what I knew, and ...
6
votes
1answer
99 views

Add up & sort a spreadsheet column

I have the following code. It's purpose is to add up and sort another columns Data. I tweaked it to fulfil my purpose, but I'm sure it can be cleaned up. The only problem I have with its function is ...
7
votes
2answers
794 views

String tokenizer via UDF

I am trying to implement strings tokenizer in Excel via UDF using C# and Excel-Dna. Personally I found the mIRC's function $gettok pretty useful due to the lack of ...
4
votes
3answers
5k views

Getting a value from an Excel sheet column

The code below gets value from a column in an Excel sheet. The values I get are B1, B2, B3, B4...., B100, ...Bn. All I need to do is strip out the char 'B' and convert the numeric string to integer ...
2
votes
1answer
715 views

Reading Excel (93-97) sheet with more than 65536 rows using cfspreadsheet

I have a process that reads multiple sheets from an Excel file, then inserts the data into a database table. However, I am experiencing some memory issues when one of the sheets contains more than ...
2
votes
1answer
1k views

Class design - Excel report

I am working on a C#.Net application that will generate an Excel report from a template. Although the code's not in the app yet, it will pull data from a SQL Server database to populate the report. ...
7
votes
2answers
190 views

Searching for an empty row in a given destination

It simply searches for an empty row in a given destination. If it is empty, it performs certain actions (copying, pasting, etc.). If it is not empty, it goes to another row. I managed to do it with ...
4
votes
1answer
688 views

Is brute force the accepted best practice for handling Excel COM 'busy' exceptions?

Following on from a question about handling-com-exceptions-busy-codes I would like to know if the following model is the accepted best practice of handling Excel COM busy messages when accessing the ...
3
votes
1answer
4k views

Is there a better or more elegant way to code this CSV cell-parser (using CSVReader)?

I'm currently doing my first internship and had to create an application that will check through the first row of a CSV for valid or invalid input. Is there a more elegant way to code or to refactor ...
5
votes
1answer
11k views

Multiple criterias in a VLOOKUP in Excel VBA

I have made the following custom defined function in Excel. It works somehow like VLOOKUP(), but it takes two criteria. I think the code is a bit of a mess. Does ...
7
votes
1answer
2k views

How to make this ping test with timer more efficient?

I wrote a small ducktaped VBA script which pings servers every 15 mins or so. If a server's status is anything other than "Alive", the server and timestamp is written to another worksheet called "Log"...
3
votes
3answers
721 views

Merging worksheets and using find/replace

Of all the macros that I put into heavy rotation these days, this one is running the slowest. ~4-5 seconds depending on the size of the files. It's not a lot but I'd like to know why code 16x as long ...
5
votes
2answers
3k views

Removing from a collection in Excel VBA

In my VBA code, I am trying to generate a specific list of cell row positions. Basically, I first fill a collection with the entire list of row positions pertaining to a specific column: ...
6
votes
1answer
1k views

Correctly import CSV data, even when possibly malformed

I've created a CSV parser that tries to build a string table out of a CSV file. The goal is to handle CSV files as well as Excel. Input CSV file: ...
1
vote
2answers
9k views

Excel instances: release and kill

Please check my code below. I don't have any problems but I'm not aware how far the code will work, release and kill excel instances.. ...
2
votes
2answers
10k views

Populate ComboBox

How could I make this code shorter and faster? ...
7
votes
2answers
386 views

Optimizing this Excel automation

The createReport method takes around 30 seconds to execute and I was wondering how I could optimize it. I'm using the ...
5
votes
3answers
846 views

Reading from an Excel sheet

I have created a class for reading data from an Excel sheet and holding on the variable. I am not sure if my code is optimized, meaning I will be reading heavily from Excel. Is there a room to ...
6
votes
2answers
3k views

Copy Excel formula in a relative way

I use NPOI to copy Excel formula, but can't find an option to do it in a relative way. Therefore, I've written a function to implement it. The task is "easy". When ...
9
votes
2answers
17k views

Powershell script for manipulating Excel files

I have a directory of .xls workbooks with the following naming convention: 001.WIP Monthly Report 002.WIP Joes Custom Report ... 129.PUR Supplier Spend The ...
26
votes
9answers
1k views

Exporting information on a collection of books to Excel

I have the following code that loops through a collection of objects and dumps different properties out to Excel. The whole j++ on every other line doesn't seem ...
8
votes
5answers
964 views

Managing book of Excel sheets

This is a follow-on from a previous question I posted here. I've got code here that works for what I want, but the problem is the loop takes ages to perform. I was wondering if anyone could follow ...
14
votes
3answers
22k views

Validating Excel file columns

I'm looking for ways to improve this code (more readable, less redundant and maybe cleaner/faster). The problem I needed to solve: I was designated to implement a software that is going to validate ...

1
18 19 20 21
22