Solved

excel column of data export format

Posted on 2014-09-03
5
305 Views
Last Modified: 2014-09-22
Is there any possible to way to achieve the following.

I have an excel spreadsheet with a single column of data (in column A), the values are text/numerical, e.g. E45678, F45679. I need a way to export all the values to a text file into the following format:

('first cell of data', 'second cell of data', third cell of data')

ready for importing into a where clause on an external RDBMS. Is this possible? I know there is concatenate but with upwards of several hundred entries it would take an age to write such a formula, I need something more automated.
0
Comment
Question by:pma111
[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
5 Comments
 
LVL 40

Expert Comment

by:als315
ID: 40301842
Can you upload sample? Both files: excel source and text file with result.
0
 
LVL 9

Assisted Solution

by:dipersp
dipersp earned 250 total points
ID: 40301845
If I'm reading what you're saying correctly - no formula needed.  I don't know how many cells this can handle, but what you can do is -

Highlight all data in column A (Can't select the entire column)
Copy
Move to cell B1.
Hit the drop down arrow in the PASTE button in the top toolbar and select SPECIAL PASTE.  Check the box for TRANSPOSE.   OK it and you're done.  

Clean up column A.

Now just export to whatever format you need.

Again, not sure this will handle hundreds - have to test it.
0
 
LVL 27

Accepted Solution

by:
Glenn Ray earned 250 total points
ID: 40301888
The fastest - not prettiest - way would be to set up a helper column with a couple of formulas:

If your data is in column A, starting in cell A1
Cell B1: =A1
Cell B2: =B1&","&A2

Copy down the formula in cell B2 as far down as your data in column A.  The last cell will have a full comma-delimited string composed of all values in A.  Note that you may not see all values displayed in the cell, but if you copy the last value into a notepad file, you'll see the whole string.

Example file attached.

Regards,
-Glenn
EE-Q28510838.xlsx
0
 
LVL 27

Expert Comment

by:Glenn Ray
ID: 40301895
PS  If you need the values bound by apostrophes:

B1:  ="'"&A1&"'"
B2: =B1&","&"'"&A2&"'" (copied down)

-Glenn
0
 
LVL 7

Expert Comment

by:tomfarrar
ID: 40304133
If I understand the question, Glen Ray has it the "nail on the head".  I have used that formula many times.
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

Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
I was prompted to write this article after the recent World-Wide Ransomware outbreak. For years now, System Administrators around the world have used the excuse of "Waiting a Bit" before applying Security Patch Updates. This type of reasoning to me …
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

738 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