Loops to compare many rows between 2 worksheets in C#?

  • Context: C# 
  • Thread starter Thread starter sweetjones
  • Start date Start date
  • Tags Tags
    C++ Compare Loops
Click For Summary

Discussion Overview

The thread discusses various programming challenges and questions related to C# and other programming languages, focusing on specific tasks such as comparing Excel worksheets, online programming courses, debugging C code, and manipulating matrices using the Boost library.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant seeks advice on creating a C# GUI tool to compare part numbers from customer requests with a weekly report in Excel, expressing challenges with control selection and looping mechanisms.
  • Another participant inquires about free online programming courses similar to FreeCodeCamp that offer certifications, indicating a desire for additional resources.
  • A different participant describes a bug in a C program related to the read() function, speculating on potential causes linked to the operating system, such as interrupts or caching.
  • Another participant requests suggestions for inserting a smaller matrix into a larger identity matrix using the Boost library, sharing their current implementation and asking for improvements.

Areas of Agreement / Disagreement

The discussion contains multiple competing views and unresolved questions, with no consensus reached on the programming challenges presented.

Contextual Notes

Participants express uncertainty about the best practices for GUI controls in C#, the behavior of the read() function in C, and the optimal methods for matrix manipulation in Boost, indicating a need for further exploration and clarification.

Who May Find This Useful

Programmers and developers interested in C#, C programming, online learning resources for coding, and matrix operations using the Boost library may find this discussion relevant.

sweetjones
Messages
44
Reaction score
0
Hello All,

I took it upon myself to create a tool for my job that xref 2 excel worksheets on 2 different workbooks. Customers send us parts and they're wanting the leadtimes for them. We have a weekly report that has all part numbers with their leadtimes. My goal is to create a GUI in C# that my team can copy & paste the customer's requested part numbers into a control, then click a button that generates a new excel file with those pasted parts in the 1st column. While simultaneously have the weekly report opened in the background. Compare each row of customer parts with the weekly report and if there's a match, provide it's respective leadtime number in column B. The only thing I have figured out so far is to open the workbooks and name the worksheet.(whoopty doo)

My issues so far:

1. What control to use in my windows form that can hold a varying number of part numbers? I know a rich textbox has limits. The number of parts a customer sends us vary. One could send in 50 part numbers, and someone else could send 2000 parts.

2. What type of loop should be used to compare 2 columns on 2 different worksheets, and provide their respective row of info?


In theory this seemed pretty straight forward and not that difficult, but it seems like working with Interop.Excel gets pretty messy. Looks like I've dug myself a deep hole. I would really appreciate any input that you may have.

Thanks in advance!
 
Technology news on Phys.org
Hi

my question is if there are any other free flex-paced similar online courses to Freecodecamp that give out a certification at the end of the course. I've been using FreeCodeCamp (www.freecodecamp.com) for a few weeks now. I love it. My question is if there are any other similar online free flex-paced computer programming classes that give out a certification at the end of the course. Thank you.
 
I have a large C program running under Qnx7. It does a lot of stuff: TCP, terminal and file IO, Qnx messaging, etc., but none of which is relevant to my question.

Been chasing down a bug in the C library read() function which intermittently returns bad data with no error indication (a 2nd read from the same file offset usually returns the correct data). To try to track it down I trap and pass all calls to the C lib read() through my own identically prototyped read_wedge() function, which fills the passed buffer with repeated calls to read() of some maximum number of bytes. If this max value is 16 or less, the program runs fine for days. At 32 if failed after 20 hours of pounding. At 256 it fails in relatively short order. The larger this number, the more likely read() is to fail it seems. I've learned over the years that blaming the OS is not conducive to finding bugs. But, and this is my question, this has to be the OS, right? (I'm thinking either interrupts or caching.)
 
Hi at all!

I need to insert a matrix in another bigger one using Boost library. An example:
I have a matrix A (3x3) and i want to insert it into an identity matrix B (4x4) in this way

matrix_block.jpg


This is my code:
C++:
boost::numeric::ublas::matrix<double> A(3,3);
boost::numeric::ublas::identity_matrix<double> B(4,4);

for (unsigned int i = 1; i < B.size1(); ++i)
{
    for (unsigned int j = 1; j < B.size2(); ++j)
    {
        B(i, j) = A(i - 1, j - 1);
    }
}

Is there a better way to do this using Boost library?

Thanks!
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 18 ·
Replies
18
Views
6K
  • · Replies 6 ·
Replies
6
Views
3K
  • Sticky
  • · Replies 13 ·
Replies
13
Views
8K
  • · Replies 3 ·
Replies
3
Views
6K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 3 ·
Replies
3
Views
4K