Solved

excel column of data export format

Posted on 2014-09-03
5
318 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This article helps those who get the 0xc004d307 error when trying to rearm (reset the license) Office 2013 in a Virtual Desktop Infrastructure (VDI) and/or those trying to prep the master image for Microsoft Key Management (KMS) activation. (i.e.- C…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

630 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