Solved

Troubleshooting Invisible Extra Characters in String

Posted on 2013-05-14
8
244 Views
Last Modified: 2013-06-11
Good Day Experts!

I have an odd situation I am investigating here.  One of our website funcions takes a list of values seperated by a comma or space or they can be typed in like:

123456789
234567890

Either of the 3 ways works fine and results appear on the screen.

However, a User copied values from Excel and pasted into the box.  They appear like above:

123456789
234567890

Problem is the results are not found.

My question: Is there anyway I can tell using some kind of "string viewer" what is in the contents of what is copied from Excel? I am guessing it is some kind of "odd" formatting character.

Thanks for helping,
jimbo99999
0
Comment
Question by:Jimbo99999
8 Comments
 
LVL 22

Accepted Solution

by:
Flyster earned 250 total points
ID: 39165399
A quick and easy way to check is the LEN function. If your data is in A1, use =LEN(A1). It will give you the number of characters in that cell. If it's more than 9 then you know there's something there that is not showing.

Flyster
0
 
LVL 43

Assisted Solution

by:Saqib Husain, Syed
Saqib Husain, Syed earned 125 total points
ID: 39165406
Instead of copying a cell, try copying the contents of the cell.

If the cell has a value then
select the cell
press F2
Highlight the characters
copy them

If the cell has a formula then
select the cell
press F2
press F9
copy the selection
0
 

Author Comment

by:Jimbo99999
ID: 39165492
The User was just trying to save time and went down the whole column and copied 20 values.  I grabbed a copy of the spreadsheet and did the same then pasted it into a variable in VB.Net.  Found a semi-colon after each value that was not visible in the spreadsheet! the website function requires the values to be seperated by a comma or space.
0
 
LVL 22

Assisted Solution

by:Flyster
Flyster earned 250 total points
ID: 39165653
If the user is just "pasting" into Excel, why not use Paste Special. Right-click the cell, select paste special and choose Values. This way no formatting is pasted.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:Jimbo99999
ID: 39166119
The User is not pasting into Excel.  Instead of manually typing 20 values into the Website, they are copying the 20 values from an Excel report and pasting into the Website box.  That is where the issue was encountered...somewhere in the formatting of the range of copied cells were embedded semi-colons after the values.  It makes sense. Instead of looking for the valid 3425678, the website function was looking for 3425678:
0
 
LVL 83

Assisted Solution

by:CodeCruiser
CodeCruiser earned 125 total points
ID: 39167471
May be you can add some more logic to handle both , and ; as a separator?
0
 

Author Comment

by:Jimbo99999
ID: 39181619
We ended up just letting the Users know that if they copy from Excel they will have to delete or back space out the spacing from pasting.  Then hit the space bar to create the required space between the values.
0
 

Author Closing Comment

by:Jimbo99999
ID: 39239314
I did not use any of your responses to "fix" the problem.  However, I values your responses and divided up the points.

Thanks,
jimbo99999
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now