Solved

What is the meaning of a lead apostrophe in an Excel file cell that causes incorrect formatting when reading in the import Excel file?

Posted on 2014-09-24
2
1,037 Views
Last Modified: 2014-09-29
I am using Excel 2010.

In worksheet SampleA, I look at 1 cell, A14, and the value in the cell is 09/22/2014 and its correspoding value in the formula bar is 9/22/2014. If I look at Fomat Cells, under the Number tab, I see
Category: Customer
Type: mm/dd/yyyy

In the same workbook, in worksheet SampleB, I look at cell, A14, and the value in the cell is 09/22/2014 and its corresponding value in the formula bar is '09/22/2014. If I look at Format Cells, under the Number tab, I see:
Category: Customers
Type: mm/dd/yyyy

What causes the formula bar value in the 2nd worksheet to begin with 1 leading ' (apostrophe) before the date?

This leading apostrophe seems to be responsible for causing this particular records from being imported from an Excel record into a Sybase table. This record is bypassed for what seems to be a formatting error.
0
Comment
Question by:zimmer9
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 27

Accepted Solution

by:
Glenn Ray earned 500 total points
ID: 40343237
I've never heard of being able to create a custom category name like "Customer" or "Customers."  I presume the category name is actually "Custom", right?  :-)

The leading apostrophe is forcing the date to appear as a string value instead of a date.   You can't do a search and replace on the apostrphes to remove them, but you could add a helper column to produce the date values and then replace those values on the original data.

Insert a temporary column in column B, then add the following formula in cell A2 and copy down:
=DATEVALUE (A2)

Then, copy and paste these values (Edit, Paste Special, Values) over the original data in column A.  Remove the helper column.  You should then be able to import this data into Sybase.

Regards,
-Glenn
0
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 40343997
Or to convert in place, just select the data, then Data tab, Text to columns, Delimited, leave all options blank in step 2, and in the last step of the wizard choose Date (MDY) and Finish.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This article describes a serious pitfall that can happen when deleting shapes using VBA.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

734 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