If Cell C1 contains the formula =VLOOKUP($A3,$B$1:$B$6,1,FALSE)
then the result in Cell C1 will be "#N/A"
You can then choose to filter on the "#N/A" values or you can use IsError() to convert them to user-friendly values: =IF(ISERROR(VLOOKUP($A1,$B$1:$B$6,1,FALSE)), $A1, "")
... =IF(ISERROR(VLOOKUP($A2,$B$1:$B$6,1,FALSE)), $A2, "")
...
Which means: if the result is not found, show the value of the original cell, otherwise show blank.
When the formula is pasted all the way down for each value, the result will be a,c,e,f
When you say "save a file", do you mean a file that has been uploaded to the web page?
Are you using a file upload control?
If so, you call SaveAs() to store the uploaded file in a particular location,
FileUpload fu = new FileUpload();
//...
fu.SaveAs(strTempFileName);
Also the class is actually so that I can make custom types
That has already been taken care of with Template/Generic classes.
Be careful not to drag old-school baggage with you as you learn CLI.
After C++ and MFC, I learned C#, THEN CLI.
I had originally tried CLI, but it seemed confusing (until I learned C#).
There are lots of things you no longer need to write (with CLI).
Are you talking about the Windows System Registry?
If so, all you will need to do is have your programs use the already existing classes and methods to manipulate it.
I understand that.
What I'm trying to understand is how ONE word is not the same as ZERO-or-MORE words.
THEN I need to see:
1) a literal string that passes the ONE word test.
2) a literal string that passes the ZERO-or-MORE words test.
3) a literal string that fails the ONE word test.
4) a literal string that fails the ZERO-or-MORE words test. <<PROBLEM
The technique I used is replacing the hash-mark and the asterisk with "Regular Expressions".
In the dot net world, we have the Regex class that is built just such a thing.
You can have a Regex that matches almost any type of pattern as long as you can express it correctly.
All you need to do then is manipulate which regular expression best fits your definition of the hash and the star in the example I gave.
What's confusing ME is the definition of one WORD versus ZERO or MORE WORDS.
Maybe you could store the articles as files, but keep track of their location, date, title and other searchable items in the database. ...but that depends on how the articles are to be searched and how long you will keep them.
Since you seem to be using C++/CLI (along with STL), I'm going to assume CLI is acceptable.
The following example replaces your special characters with Regular Expression syntax.
You can tweak the Replace parameters to be exactly what you want, but you can see what was done here:
The problem comes from Carriage-Returns inside the cells of the DataGridView, right?
If you chek the content of each cell (or target cells) for unwanted chars, you can replace them before writing them to the CSV.
In Solution Explorer, right click the solution name and select:
Add -> Existing Project
Browse to your existing project and add it.
Remember to add the reference from the sub-project to the main project.
...do it in the "project" tab under the Add References dialog box.